summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-01-24 06:20:13 +0000
committerMike Frysinger <vapier@gentoo.org>2012-01-24 06:20:13 +0000
commit121a15d64a219d2eae7ddc184d8b9700aad93220 (patch)
tree765d5ea09cc4f1f99c2ff38ea49041ab8895f94f /sys-process/procps
parentAdd --with-boost-thread=boost_thread-mt to config as suggested at http://www.... (diff)
downloadgentoo-2-121a15d64a219d2eae7ddc184d8b9700aad93220.tar.gz
gentoo-2-121a15d64a219d2eae7ddc184d8b9700aad93220.tar.bz2
gentoo-2-121a15d64a219d2eae7ddc184d8b9700aad93220.zip
Version bump #399377 by Samuli Suominen.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'sys-process/procps')
-rw-r--r--sys-process/procps/ChangeLog8
-rw-r--r--sys-process/procps/files/procps-3.3.2-headers.patch205
-rw-r--r--sys-process/procps/files/procps-3.3.2-noproc.patch17
-rw-r--r--sys-process/procps/procps-3.3.2_p2.ebuild51
4 files changed, 280 insertions, 1 deletions
diff --git a/sys-process/procps/ChangeLog b/sys-process/procps/ChangeLog
index 38ac246a8251..e5f62d55b483 100644
--- a/sys-process/procps/ChangeLog
+++ b/sys-process/procps/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-process/procps
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.60 2012/01/04 22:36:04 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.61 2012/01/24 06:20:13 vapier Exp $
+
+*procps-3.3.2_p2 (24 Jan 2012)
+
+ 24 Jan 2012; Mike Frysinger <vapier@gentoo.org> +procps-3.3.2_p2.ebuild,
+ +files/procps-3.3.2-headers.patch, +files/procps-3.3.2-noproc.patch:
+ Version bump #399377 by Samuli Suominen.
04 Jan 2012; Brent Baude <ranger@gentoo.org> procps-3.2.8_p11.ebuild:
Marking procps-3.2.8_p11 ppc for bug 390003
diff --git a/sys-process/procps/files/procps-3.3.2-headers.patch b/sys-process/procps/files/procps-3.3.2-headers.patch
new file mode 100644
index 000000000000..c359f4c9062f
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.2-headers.patch
@@ -0,0 +1,205 @@
+From 3bbf0d863131ce650928460bf1222617e7e68094 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 24 Jan 2012 00:33:57 -0500
+Subject: [PATCH 1/5] include error.h for error() and friends
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/c.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/include/c.h b/include/c.h
+index 2be7495..747e4e3 100644
+--- a/include/c.h
++++ b/include/c.h
+@@ -16,6 +16,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
++#include <error.h>
+
+ /*
+ * Compiler specific stuff
+--
+1.7.8.3
+
+From eee0a65a45713a8e6efcfd94dbeabd33f6cf8a3a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 24 Jan 2012 00:36:02 -0500
+Subject: [PATCH 2/5] watch: include sys/wait.h for waitpid
+
+Fixes build warning:
+ watch.c:682:3: warning: implicit declaration of
+ function 'waitpid' [-Wimplicit-function-declaration]
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ watch.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/watch.c b/watch.c
+index 4a2646b..0bb6239 100644
+--- a/watch.c
++++ b/watch.c
+@@ -31,6 +31,7 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
++#include <sys/wait.h>
+ #include <termios.h>
+ #include <termios.h>
+ #include <time.h>
+--
+1.7.8.3
+
+From 4191f4598701b7d76df4be0506f06f15d97b9a64 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 24 Jan 2012 00:39:49 -0500
+Subject: [PATCH 3/5] use helpers from c.h
+
+A few files still use the C library helpers from err.h, so migrate
+them to the local c.h helpers.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/xalloc.h | 8 ++++----
+ proc/sig.c | 3 ++-
+ skill.c | 2 +-
+ 4 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/include/xalloc.h b/include/xalloc.h
+index bd02c75..37bf0ef 100644
+--- a/include/xalloc.h
++++ b/include/xalloc.h
+@@ -24,7 +24,7 @@ void *xmalloc(const size_t size)
+ {
+ void *ret = malloc(size);
+ if (!ret && size)
+- err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ xerrx(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
+ return ret;
+ }
+
+@@ -33,7 +33,7 @@ void *xrealloc(void *ptr, const size_t size)
+ {
+ void *ret = realloc(ptr, size);
+ if (!ret && size)
+- err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ xerrx(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
+ return ret;
+ }
+
+@@ -42,7 +42,7 @@ void *xcalloc(const size_t nelems, const size_t size)
+ {
+ void *ret = calloc(nelems, size);
+ if (!ret && size && nelems)
+- err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
++ xerrx(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
+ return ret;
+ }
+
+@@ -53,7 +53,7 @@ static inline char *xstrdup(const char *str)
+ return NULL;
+ ret = strdup(str);
+ if (!ret)
+- err(XALLOC_EXIT_CODE, "cannot duplicate string");
++ xerrx(XALLOC_EXIT_CODE, "cannot duplicate string");
+ return ret;
+ }
+
+diff --git a/proc/sig.c b/proc/sig.c
+index 1137fef..b83e645 100644
+--- a/proc/sig.c
++++ b/proc/sig.c
+@@ -13,6 +13,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "sig.h"
++#include "c.h"
+
+ /* Linux signals:
+ *
+@@ -221,7 +222,7 @@ char *strtosig(const char *restrict s){
+
+ copy = strdup(s);
+ if (!copy)
+- err(EXIT_FAILURE, "cannot duplicate string");
++ xerrx(EXIT_FAILURE, "cannot duplicate string");
+ for (p = copy; *p != '\0'; p++)
+ *p = toupper(*p);
+ p = copy;
+diff --git a/skill.c b/skill.c
+index de3ccb9..078624d 100644
+--- a/skill.c
++++ b/skill.c
+@@ -131,7 +131,7 @@ static void check_proc(int pid, struct run_time_conf_t *run_time)
+ if (fd == -1) {
+ /* process exited maybe */
+ if (run_time->warnings)
+- warn(_("cannot open file %s"), buf);
++ xwarn(_("cannot open file %s"), buf);
+ return;
+ }
+ fstat(fd, &statbuf);
+--
+1.7.8.3
+
+From b5de7d14e1db889c83dc45ae275652aa042c359c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 24 Jan 2012 00:41:25 -0500
+Subject: [PATCH 4/5] proc: pull in ctype.h where needed
+
+Fix the build warnings:
+
+sig.c:227:5: warning: implicit declaration of function 'toupper' [-Wimplicit-function-declaration]
+sig.c:231:3: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ proc/sig.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/proc/sig.c b/proc/sig.c
+index b83e645..b427e01 100644
+--- a/proc/sig.c
++++ b/proc/sig.c
+@@ -8,6 +8,7 @@
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ */
++#include <ctype.h>
+ #include <signal.h>
+ #include <string.h>
+ #include <stdio.h>
+--
+1.7.8.3
+
+From 4abea5e70d391a363c2af9a6405e375081cb10b2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 24 Jan 2012 00:43:35 -0500
+Subject: [PATCH 5/5] ps: include error.h
+
+This code currently uses error_at_line() from error.h, so pull it in.
+Long term, this might get moved to c.h as a local helper on err.h,
+but I have no idea.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ ps/global.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/ps/global.c b/ps/global.c
+index 22cf3ef..5bddb8c 100644
+--- a/ps/global.c
++++ b/ps/global.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <termios.h>
+ #include <unistd.h>
++#include <error.h>
+
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+--
+1.7.8.3
+
diff --git a/sys-process/procps/files/procps-3.3.2-noproc.patch b/sys-process/procps/files/procps-3.3.2-noproc.patch
new file mode 100644
index 000000000000..43cf5b2ef9af
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.2-noproc.patch
@@ -0,0 +1,17 @@
+If /proc isnt mounted, `top` will cause screen corruption ...
+
+--- b/top/top.c
++++ b/top/top.c
+@@ -3201,6 +3201,12 @@
+ {
+ (void)dont_care_argc;
+ before(*argv);
++
++ if (access("/proc/stat", F_OK)) {
++ fprintf(stderr, "/proc is not mounted, required for output data");
++ exit(1);
++ }
++
+ // +-------------+
+ windows_stage1(); // top (sic) slice
+ configs_read(); // > spread etc, <
diff --git a/sys-process/procps/procps-3.3.2_p2.ebuild b/sys-process/procps/procps-3.3.2_p2.ebuild
new file mode 100644
index 000000000000..befe2a21fce7
--- /dev/null
+++ b/sys-process/procps/procps-3.3.2_p2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/procps-3.3.2_p2.ebuild,v 1.1 2012/01/24 06:20:13 vapier Exp $
+
+EAPI="4"
+
+inherit flag-o-matic eutils toolchain-funcs multilib
+
+DEB_VER=${PV#*_p}
+MY_PV=${PV%_p*}
+DESCRIPTION="standard informational utilities and process-handling tools"
+HOMEPAGE="http://procps.sourceforge.net/ http://gitorious.org/procps http://packages.debian.org/sid/procps"
+SRC_URI="mirror://debian/pool/main/p/procps/${PN}_${MY_PV}.orig.tar.gz
+ mirror://debian/pool/main/p/procps/${PN}_${MY_PV}-${DEB_VER}.debian.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="static-libs unicode"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2[unicode?]"
+
+S=${WORKDIR}/${PN}-ng-${MY_PV}
+
+src_prepare() {
+ local d="${WORKDIR}"/debian/patches
+ EPATCH_SOURCE="${d}" epatch $(<"${d}"/series)
+
+ epatch "${FILESDIR}"/${PN}-3.3.2-noproc.patch
+ epatch "${FILESDIR}"/${PN}-3.3.2-headers.patch
+}
+
+src_configure() {
+ econf \
+ --exec-prefix="${EPREFIX}/" \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ # Baselayout takes care of this file
+ dodoc "${ED}"/etc/sysctl.conf
+ rm "${ED}"/etc/sysctl.conf || die
+
+ # The configure script is completely whacked in the head
+ mv "${ED}"/lib* "${ED}"/usr/ || die
+ gen_usr_ldscript -a procps
+ find "${ED}" -name '*.la' -delete
+}