diff --git a/htop-0.8.1-nonprint.patch b/htop-0.8.1-nonprint.patch deleted file mode 100644 index cbebc06..0000000 --- a/htop-0.8.1-nonprint.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- RichString.c.orig 2008-03-09 03:23:49.000000000 +0100 -+++ RichString.c 2008-11-18 12:30:21.000000000 +0100 -@@ -89,7 +89,7 @@ - inline void RichString_appendn(RichString* this, int attrs, char* data_c, int len) { - int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len); - for (int i = this->len, j = 0; i < last; i++, j++) -- this->chstr[i] = data_c[j] | attrs; -+ this->chstr[i] = ((data_c[j] > 31) ? data_c[j] : '?' ) | attrs; - this->chstr[last] = 0; - this->len = last; - } diff --git a/htop-0.8.1-processlist.patch b/htop-0.8.1-processlist.patch deleted file mode 100644 index 6229d63..0000000 --- a/htop-0.8.1-processlist.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- ProcessList.c.orig 2008-09-23 08:23:14.000000000 +0200 -+++ ProcessList.c 2009-02-05 19:11:29.000000000 +0100 -@@ -563,9 +563,9 @@ - process->pid = pid; - } - } -- if (parent) { -- process->tgid = parent->pid; -- } -+ -+ process->tgid = parent ? parent->pid : pid; -+ - - if (showUserlandThreads && (!parent || pid != parent->pid)) { - char subdirname[MAX_NAME+1]; diff --git a/htop-0.8.2-arrays.patch b/htop-0.8.2-arrays.patch deleted file mode 100644 index 0654d8a..0000000 --- a/htop-0.8.2-arrays.patch +++ /dev/null @@ -1,71 +0,0 @@ -Index: FunctionBar.c -=================================================================== ---- FunctionBar.c (revision 162) -+++ FunctionBar.c (working copy) -@@ -52,12 +52,14 @@ FunctionBar* FunctionBar_new(char** func - this->functions = malloc(sizeof(char*) * 15); - this->keys = malloc(sizeof(char*) * 15); - this->events = malloc(sizeof(int) * 15); -- int i = 0; -- while (i < 15 && functions[i]) { -+ int i; -+ for (i = 0; i < 15; i++) { -+ if (functions[i] == NULL) /* We don't know the size of the array, */ -+ break; /* so let's assume it is NULL terminated */ -+ /* and break if we find that NULL */ - this->functions[i] = String_copy(functions[i]); - this->keys[i] = String_copy(keys[i]); - this->events[i] = events[i]; -- i++; - } - this->size = i; - } else { -Index: htop.c -=================================================================== ---- htop.c (revision 162) -+++ htop.c (working copy) -@@ -151,7 +151,7 @@ static void showHelp(ProcessList* pl) { - clear(); - } - --static char* CategoriesFunctions[10] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done "}; -+static char* CategoriesFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL}; - - static void Setup_run(Settings* settings, int headerHeight) { - ScreenManager* scr = ScreenManager_new(0, headerHeight, 0, -1, HORIZONTAL, true); -@@ -190,7 +190,7 @@ static HandlerResult pickWithEnter(Panel - } - - static Object* pickFromVector(Panel* panel, Panel* list, int x, int y, char** keyLabels, FunctionBar* prevBar) { -- char* fuKeys[2] = {"Enter", "Esc"}; -+ char* fuKeys[] = {"Enter", "Esc", NULL}; - int fuEvents[2] = {13, 27}; - if (!list->eventHandler) - Panel_setEventHandler(list, pickWithEnter); -@@ -326,7 +326,7 @@ int main(int argc, char** argv) { - Panel_setRichHeader(panel, ProcessList_printHeader(pl)); - - char* searchFunctions[] = {"Next ", "Exit ", " Search: ", NULL}; -- char* searchKeys[] = {"F3", "Esc", " "}; -+ char* searchKeys[] = {"F3", "Esc", " ", NULL}; - int searchEvents[] = {KEY_F(3), 27, ERR}; - FunctionBar* searchBar = FunctionBar_new(searchFunctions, searchKeys, searchEvents); - -@@ -656,7 +656,7 @@ int main(int argc, char** argv) { - - Panel* affinityPanel = AffinityPanel_new(pl->processorCount, curr); - -- char* fuFunctions[2] = {"Set ", "Cancel "}; -+ char* fuFunctions[3] = {"Set ", "Cancel ", NULL}; - void* set = pickFromVector(panel, affinityPanel, 15, headerHeight, fuFunctions, defaultBar); - if (set) { - unsigned long new = AffinityPanel_getAffinity(affinityPanel); -@@ -695,7 +695,7 @@ int main(int argc, char** argv) { - { - Panel* sortPanel = Panel_new(0, 0, 0, 0, LISTITEM_CLASS, true, ListItem_compare); - Panel_setHeader(sortPanel, "Sort by"); -- char* fuFunctions[2] = {"Sort ", "Cancel "}; -+ char* fuFunctions[] = {"Sort ", "Cancel ", NULL}; - ProcessField* fields = pl->fields; - for (int i = 0; fields[i]; i++) { - char* name = String_trim(Process_fieldTitles[fields[i]]); diff --git a/htop-0.8.3-system-plpa.patch b/htop-0.8.3-system-plpa.patch deleted file mode 100644 index 1407dfd..0000000 --- a/htop-0.8.3-system-plpa.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -up htop-0.8.3/acinclude.m4.noplpa htop-0.8.3/acinclude.m4 ---- htop-0.8.3/acinclude.m4.noplpa 2010-03-04 15:35:47.457908679 -0500 -+++ htop-0.8.3/acinclude.m4 2010-03-04 15:35:50.721919708 -0500 -@@ -1 +0,0 @@ --m4_include(plpa-1.1/plpa.m4) -diff -up htop-0.8.3/configure.ac.noplpa htop-0.8.3/configure.ac ---- htop-0.8.3/configure.ac.noplpa 2009-06-23 09:53:18.000000000 -0400 -+++ htop-0.8.3/configure.ac 2010-03-04 15:34:41.578909559 -0500 -@@ -97,12 +97,7 @@ fi - AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) - AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) - --PLPA_INCLUDED(plpa-1.1) --PLPA_INIT(plpa_happy=yes, plpa_happy=no) --AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes"]) --if test "$plpa_happy" = "yes"; then -- AC_DEFINE([HAVE_PLPA], [1], [Have plpa]) --fi -+AC_CHECK_LIB([plpa], [plpa_sched_getaffinity], [], [missing_libraries="$missing_libraries libplpa"]) - - AC_CONFIG_FILES([Makefile htop.1]) - AC_OUTPUT -diff -up htop-0.8.3/Makefile.am.noplpa htop-0.8.3/Makefile.am ---- htop-0.8.3/Makefile.am.noplpa 2009-06-02 15:17:57.000000000 -0400 -+++ htop-0.8.3/Makefile.am 2010-03-04 15:34:41.579909477 -0500 -@@ -1,8 +1,4 @@ - --if HAVE_PLPA --SUBDIRS = plpa-1.1 --endif -- - bin_PROGRAMS = htop - dist_man_MANS = htop.1 - EXTRA_DIST = $(dist_man_MANS) htop.desktop htop.png scripts/MakeHeader.py \ -@@ -37,9 +33,6 @@ SUFFIXES = .h - - BUILT_SOURCES = $(myhtopheaders) - htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h --if HAVE_PLPA --htop_LDADD = $(top_builddir)/plpa-1.1/src/libplpa_included.la --endif - - profile: - $(MAKE) all CFLAGS="-pg -O2" diff --git a/htop-0.9-system-plpa.patch b/htop-0.9-system-plpa.patch new file mode 100644 index 0000000..7422cad --- /dev/null +++ b/htop-0.9-system-plpa.patch @@ -0,0 +1,45 @@ +diff -up htop-0.8.3/acinclude.m4.noplpa htop-0.8.3/acinclude.m4 +--- htop-0.8.3/acinclude.m4.noplpa 2010-03-04 15:35:47.457908679 -0500 ++++ htop-0.8.3/acinclude.m4 2010-03-04 15:35:50.721919708 -0500 +@@ -1 +0,0 @@ +-m4_include(plpa-1.3.2/plpa.m4) +diff -up htop-0.8.3/Makefile.am.noplpa htop-0.8.3/Makefile.am +--- htop-0.8.3/Makefile.am.noplpa 2009-06-02 15:17:57.000000000 -0400 ++++ htop-0.8.3/Makefile.am 2010-03-04 15:34:41.579909477 -0500 +@@ -1,8 +1,4 @@ + +-if HAVE_PLPA +-SUBDIRS = plpa-1.3.2 +-endif +- + ACLOCAL_AMFLAGS=-I m4 + + bin_PROGRAMS = htop +@@ -35,9 +35,6 @@ + + BUILT_SOURCES = $(myhtopheaders) + htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h +-if HAVE_PLPA +-htop_LDADD = $(top_builddir)/plpa-1.3.2/src/libplpa/libplpa_included.la +-endif + + profile: + $(MAKE) all CFLAGS="-pg -O2" +--- htop-0.9/configure.ac.orig 2011-03-05 13:45:09.000000000 +0100 ++++ htop-0.9/configure.ac 2011-03-05 13:45:29.000000000 +0100 +@@ -104,14 +104,7 @@ + AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) + AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) + +-AC_ARG_ENABLE(plpa, [AC_HELP_STRING([--enable-plpa], [enable PLPA support for CPU affinity])], ,enable_plpa="yes") +-PLPA_INCLUDED +-PLPA_INIT([plpa-1.3.2], [plpa_happy=yes], [plpa_happy=no]) +-AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes" && test "$enable_plpa" = "yes"]) +-if test "$plpa_happy" = "yes" && test "$enable_plpa" = "yes" +-then +- AC_DEFINE([HAVE_PLPA], [1], [Have plpa]) +-fi ++AC_CHECK_LIB([plpa], [plpa_sched_getaffinity], [], [missing_libraries="$missing_libraries libplpa"]) + + AC_CONFIG_FILES([Makefile htop.1]) + AC_OUTPUT diff --git a/htop.spec b/htop.spec index 3c1c904..11780b3 100644 --- a/htop.spec +++ b/htop.spec @@ -1,17 +1,14 @@ Name: htop -Version: 0.8.3 -Release: 4%{?dist} +Version: 0.9 +Release: 1%{?dist} Summary: Interactive process viewer -Summary(pl): Interaktywna przeglądarka procesów Group: Applications/System License: GPL+ URL: http://htop.sourceforge.net/ Source0: http://download.sourceforge.net/htop/%{name}-%{version}.tar.gz -#Patch0: %{name}-0.8.1-nonprint.patch -#Patch1: %{name}-0.8.1-processlist.patch -#Patch2: %{name}-0.8.2-arrays.patch -Patch3: htop-0.8.3-system-plpa.patch +# Use system plpa +Patch3: htop-0.9-system-plpa.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils @@ -21,19 +18,10 @@ BuildRequires: ncurses-devel, python, libtool, plpa-devel htop is an interactive text-mode process viewer for Linux, similar to top(1). -%description -l pl -htop to interaktywna tekstowa przeglądarka procesów dla Linuksa podobna -do top(1). - - %prep %setup -q -#%patch0 -p0 -#%patch1 -p0 -#%patch2 -p0 %patch3 -p1 -b .noplpa sed -i s#"INSTALL_DATA = @INSTALL_DATA@"#"INSTALL_DATA = @INSTALL_DATA@ -p"# Makefile.in -#sed -i -e '2,3d' -e '9d' htop.desktop # We will use the plpa system copy instead. rm -rf plpa-1.1/ @@ -72,6 +60,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Mar 05 2011 Miloš Jakubíček - 0.9-1 +- Update to 0.9 +- Clean specfile, remove Polish translations, unused patches + * Wed Feb 09 2011 Fedora Release Engineering - 0.8.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild