Hello community, here is the log from the commit of package iftop for openSUSE:Factory checked in at 2019-02-27 17:29:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iftop (Old) and /work/SRC/openSUSE:Factory/.iftop.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iftop" Wed Feb 27 17:29:30 2019 rev:29 rq:679570 version:0.99.4 Changes: -------- --- /work/SRC/openSUSE:Factory/iftop/iftop.changes 2014-07-12 17:15:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.iftop.new.28833/iftop.changes 2019-02-27 17:29:31.819312572 +0100 @@ -1,0 +2,6 @@ +Thu Jan 3 13:22:08 UTC 2019 - Cristian RodrÃguez <[email protected]> + +- 0001-Prefer-ncurses6w.patch: prefer ncursesw6, previously force-fed + via CFLAGS/LDFLAGS but did not really work. + +------------------------------------------------------------------- New: ---- 0001-Prefer-ncurses6w.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iftop.spec ++++++ --- /var/tmp/diff_new_pack.XxMUli/_old 2019-02-27 17:29:32.271312410 +0100 +++ /var/tmp/diff_new_pack.XxMUli/_new 2019-02-27 17:29:32.271312410 +0100 @@ -25,13 +25,15 @@ %define pkg_version 1.0pre4 Url: http://www.ex-parrot.com/~pdw/iftop/ BuildRequires: libpcap-devel -BuildRequires: ncurses-devel +BuildRequires: pkgconfig(ncursesw) +BuildRequires: automake Source0: http://www.ex-parrot.com/~pdw/iftop/download/iftop-%{pkg_version}.tar.gz Patch0: MAC-address-format.patch Patch1: 001-Avoid-32-bit-overflow-for-rates-when-calculating-bar.patch Patch2: 002-scale-up-to-tbit.patch Patch3: 003-rateidx_init-fix.patch Patch4: 004-iftop-unlimited_text_output.patch +Patch5: 0001-Prefer-ncurses6w.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -47,10 +49,10 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build -export CFLAGS="%optflags $(ncursesw6-config --cflags)" -export LDFLAGS="$(ncursesw6-config --libs)" +autoreconf -fiv %configure %__make %{?smp_mflags} CPPFLAGS=-DUSE_GETIFADDRS @@ -61,6 +63,6 @@ %defattr(-,root,root) %doc README ChangeLog COPYING TODO %{_sbindir}/iftop -%doc %{_mandir}/man8/iftop.8* +%{_mandir}/man8/iftop.8* %changelog ++++++ 0001-Prefer-ncurses6w.patch ++++++ >From 5c213cce4f4a8b6a68dec4bca00e5754ff3d9e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= <[email protected]> Date: Thu, 3 Jan 2019 10:13:41 -0300 Subject: [PATCH] Prefer ncurses6w. --- Makefile.am | 4 +++- configure.ac | 60 ++-------------------------------------------------- 2 files changed, 5 insertions(+), 59 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4a5ec95..d11953b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,11 +13,13 @@ sbin_PROGRAMS = iftop #iftop-dump +iftop_CFLAGS = $(NCURSES_CFLAGS) -pthread -Wall -fvisibility=hidden iftop_SOURCES = addr_hash.c edline.c hash.c iftop.c ns_hash.c \ options.c resolver.c screenfilter.c serv_hash.c \ sorted_list.c threadprof.c ui_common.c ui.c tui.c util.c \ addrs_ioctl.c addrs_dlpi.c dlcommon.c \ - stringmap.c cfgfile.c vector.c + stringmap.c cfgfile.c +iftop_LDADD = $(NCURSES_LIBS) #iftop_dump_SOURCES = counter_hash.c hash.c iftop-dump.c \ # options.c \ diff --git a/configure.ac b/configure.ac index b93a206..0d3dc55 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,7 @@ AM_INIT_AUTOMAKE dnl Make sure we have a C compiler.... AC_PROG_CC AC_HEADER_STDC +AC_USE_SYSTEM_EXTENSIONS dnl dnl Options to configure. @@ -347,70 +348,13 @@ dnl we use the (apparently obscure) mvchgat function. Unfortunately, there's dnl a solid chance that mvchgat is a macro, so we can't just use dnl AC_SEARCH_LIBS.... dnl - -AC_MSG_CHECKING([for a curses library containing mvchgat]) -oldLIBS=$LIBS -for curseslib in ncursesw curses ncurses ; do - LIBS="$oldLIBS -l$curseslib" - AC_TRY_LINK([ -#include <$curseslib.h> - ], [ - mvchgat(0, 0, 1, A_REVERSE, 0, NULL) - ], [ - foundcurseslib=$curseslib - break - ]) -done - -if test x$foundcurseslib = x ; then - AC_MSG_RESULT([none found]) - AC_MSG_ERROR([Curses! Foiled again! - (Can't find a curses library supporting mvchgat.) - Consider installing ncurses.]) -else - AC_MSG_RESULT([-l$foundcurseslib]) -fi - +PKG_CHECK_MODULES([NCURSES], [ncursesw]) dnl dnl POSIX threads. Different systems like different combinations of flags, dnl libraries, etc. We use a test program to figure this stuff out. dnl -AC_MSG_CHECKING([POSIX threads compilation]) -thrfail=1 -oldCFLAGS=$CFLAGS -oldLIBS=$LIBS -for flag in "" -mt -pthread -thread ; do - CFLAGS="$oldCFLAGS $flag" - for lib in "" -lpthread "-lpthread -lposix4" ; do - LIBS="$oldLIBS $lib" - AC_LINK_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], [ - foundthrlib=$lib - foundthrflag=$flag - thrfail=0 - break - ]) - done - if test $thrfail = 0 ; then - break - fi -done - -if test $thrfail = 1 ; then - AC_MSG_RESULT([no idea]) - AC_MSG_ERROR([can't figure out how to compile with POSIX threads - If your system actually supports POSIX threads, this means we've messed up.]) -fi - -AC_MSG_RESULT([CFLAGS=$foundthrflag and LIBS=$foundthrlib]) -AC_MSG_CHECKING([POSIX threads usability]) -AC_RUN_IFELSE([AC_LANG_SOURCE([`cat config/pthread.c`])], - [AC_MSG_RESULT([yes])], - [AC_MSG_ERROR( - [it fails. We probably guessed the wrong CFLAGS.])], - [AC_MSG_RESULT([can't test because we are cross-compiling])]) - dnl dnl Are we on a system (like Solaris) that requires promiscuous mode in order to dnl see any outgoing packets? -- 2.19.2
