summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-07-20 05:47:41 +0000
committerMike Frysinger <vapier@gentoo.org>2011-07-20 05:47:41 +0000
commit3096e9246bb765969d4a00c0e10a6b21be042190 (patch)
tree5bd9792e078f3f3baddf23d30fc036df9d1e9a3d /sys-process
parentepatch: use EPATCH_SOURCE as a [relative] search dir even when patches are sp... (diff)
downloadgentoo-2-3096e9246bb765969d4a00c0e10a6b21be042190.tar.gz
gentoo-2-3096e9246bb765969d4a00c0e10a6b21be042190.tar.bz2
gentoo-2-3096e9246bb765969d4a00c0e10a6b21be042190.zip
Start using Debian patchset #375275 by Dieter Ries.
(Portage version: 2.2.0_alpha45/cvs/Linux x86_64)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/procps/ChangeLog9
-rw-r--r--sys-process/procps/files/procps-3.2.3-noproc.patch17
-rw-r--r--sys-process/procps/files/procps-3.2.8-r1-forest-prefix.patch42
-rw-r--r--sys-process/procps/procps-3.2.8_p10.ebuild83
4 files changed, 138 insertions, 13 deletions
diff --git a/sys-process/procps/ChangeLog b/sys-process/procps/ChangeLog
index 2b18c8356814..19febf263def 100644
--- a/sys-process/procps/ChangeLog
+++ b/sys-process/procps/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-process/procps
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.48 2011/06/14 20:35:27 mattst88 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.49 2011/07/20 05:47:41 vapier Exp $
+
+*procps-3.2.8_p10 (20 Jul 2011)
+
+ 20 Jul 2011; Mike Frysinger <vapier@gentoo.org>
+ files/procps-3.2.3-noproc.patch, +procps-3.2.8_p10.ebuild,
+ +files/procps-3.2.8-r1-forest-prefix.patch:
+ Start using Debian patchset #375275 by Dieter Ries.
14 Jun 2011; Matt Turner <mattst88@gentoo.org>
-files/procps-3.2.6-mips-n32_isnt_usable_on_mips64_yet.patch,
diff --git a/sys-process/procps/files/procps-3.2.3-noproc.patch b/sys-process/procps/files/procps-3.2.3-noproc.patch
index f581cf459c82..6da48eb44f42 100644
--- a/sys-process/procps/files/procps-3.2.3-noproc.patch
+++ b/sys-process/procps/files/procps-3.2.3-noproc.patch
@@ -1,22 +1,15 @@
-Ripped from Fedora
-
If /proc isnt mounted, `top` will cause screen corruption ...
--- procps-3.2.3/top.c
+++ procps-3.2.3/top.c
-@@ -3201,12 +3201,15 @@
-
- int main (int dont_care_argc, char *argv[])
+@@ -3201,6 +3201,10 @@
{
-+ struct stat isproc;
(void)dont_care_argc;
before(*argv);
++
++ if (access("/proc/stat", F_OK))
++ std_err("/proc is not mounted, required for output data");
++
// +-------------+
windows_stage1(); // top (sic) slice
configs_read(); // > spread etc, <
- parse_args(&argv[1]); // > lean stuff, <
-+ if (stat("/proc/self", &isproc)==-1)
-+ std_err("/proc is not mounted, required for output data");
- whack_terminal(); // > onions etc. <
- windows_stage2(); // as bottom slice
- // +-------------+
diff --git a/sys-process/procps/files/procps-3.2.8-r1-forest-prefix.patch b/sys-process/procps/files/procps-3.2.8-r1-forest-prefix.patch
new file mode 100644
index 000000000000..cee331e53ca2
--- /dev/null
+++ b/sys-process/procps/files/procps-3.2.8-r1-forest-prefix.patch
@@ -0,0 +1,42 @@
+avoid gcc warnings like:
+
+ps/output.c:341:6: warning: the address of ‘forest_prefix’ will always evaluate as ‘true’
+
+--- a/ps/output.c
++++ b/ps/output.c
+@@ -338,7 +338,7 @@ static int pr_args(char *restrict const
+ unsigned flags;
+ int rightward=max_rightward;
+
+- if(forest_prefix){
++ if(/*forest_prefix*/1){
+ int fh = forest_helper(outbuf);
+ endp += fh;
+ rightward -= fh;
+@@ -405,7 +405,7 @@ static int pr_cgroup(char *restrict cons
+ if(pp->cgroup && *pp->cgroup) {
+ char *endp = outbuf;
+ int rightward=max_rightward;
+- if(forest_prefix){
++ if(/*forest_prefix*/1){
+ int fh = forest_helper(outbuf);
+ endp += fh;
+ rightward -= fh;
+@@ -365,7 +365,7 @@ static int pr_comm(char *restrict const
+ unsigned flags;
+ int rightward=max_rightward;
+
+- if(forest_prefix){
++ if(/*forest_prefix*/1){
+ int fh = forest_helper(outbuf);
+ endp += fh;
+ rightward -= fh;
+@@ -390,7 +390,7 @@ static int pr_fname(char *restrict const
+ char *endp = outbuf;
+ int rightward = max_rightward;
+
+- if(forest_prefix){
++ if(/*forest_prefix*/1){
+ int fh = forest_helper(outbuf);
+ endp += fh;
+ rightward -= fh;
diff --git a/sys-process/procps/procps-3.2.8_p10.ebuild b/sys-process/procps/procps-3.2.8_p10.ebuild
new file mode 100644
index 000000000000..92209f588512
--- /dev/null
+++ b/sys-process/procps/procps-3.2.8_p10.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/procps-3.2.8_p10.ebuild,v 1.1 2011/07/20 05:47:41 vapier Exp $
+
+EAPI="2"
+
+inherit flag-o-matic eutils toolchain-funcs multilib
+
+DEB_VER=${PV#*_p}
+MY_PV=${PV%_p*}
+MY_P="${PN}-${MY_PV}"
+DESCRIPTION="Standard informational utilities and process-handling tools"
+HOMEPAGE="http://procps.sourceforge.net/"
+SRC_URI="http://procps.sourceforge.net/${MY_P}.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="unicode"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ local d="${WORKDIR}"/debian/patches
+ EPATCH_SOURCE="${d}" \
+ epatch $(<"${d}"/series)
+ # fixup debian watch_exec_beep.patch
+ sed -i '1i#include <sys/wait.h>' watch.c || die
+
+ epatch "${FILESDIR}"/${PN}-3.2.7-proc-mount.patch
+ epatch "${FILESDIR}"/${PN}-3.2.3-noproc.patch
+ epatch "${FILESDIR}"/${PN}-3.2.8-toprc-fixup.patch
+ epatch "${FILESDIR}"/${PN}-3.2.8-r1-forest-prefix.patch
+
+ # Clean up the makefile
+ # - we do stripping ourselves
+ # - punt fugly gcc flags
+ sed -i \
+ -e '/install/s: --strip : :' \
+ -e '/ALL_CFLAGS += $(call check_gcc,-fweb,)/d' \
+ -e '/ALL_CFLAGS += $(call check_gcc,-Wstrict-aliasing=2,)/s,=2,,' \
+ -e "/^lib64/s:=.*:=$(get_libdir):" \
+ -e 's:-m64::g' \
+ Makefile || die "sed Makefile"
+
+ # mips 2.4.23 headers (and 2.6.x) don't allow PAGE_SIZE to be defined in
+ # userspace anymore, so this patch instructs procps to get the
+ # value from sysconf().
+ epatch "${FILESDIR}"/${PN}-mips-define-pagesize.patch
+
+ # lame unicode stuff checks glibc defines
+ sed -i "s:__GNU_LIBRARY__ >= 6:0 == $(use unicode; echo $?):" proc/escape.c || die
+}
+
+src_compile() {
+ replace-flags -O3 -O2
+ emake \
+ CC="$(tc-getCC)" \
+ CPPFLAGS="${CPPFLAGS}" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ || die "make failed"
+}
+
+src_install() {
+ emake \
+ ln_f="ln -sf" \
+ ldconfig="true" \
+ DESTDIR="${D}" \
+ install \
+ || die "install failed"
+
+ insinto /usr/include/proc
+ doins proc/*.h || die
+
+ dodoc sysctl.conf BUGS NEWS TODO ps/HACKING
+
+ # compat symlink so people who shouldnt be using libproc can #170077
+ dosym libproc-${PV}.so /$(get_libdir)/libproc.so || die
+}