summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-11-21 20:16:28 +0000
committerMike Frysinger <vapier@gentoo.org>2010-11-21 20:16:28 +0000
commit38e63be23e21465ad7d1765b708bd3673f38f36a (patch)
treed866ebe6b5fe0c78ae78860e919e315102fb713f /sys-process
parentproperly document things (diff)
downloadgentoo-2-38e63be23e21465ad7d1765b708bd3673f38f36a.tar.gz
gentoo-2-38e63be23e21465ad7d1765b708bd3673f38f36a.tar.bz2
gentoo-2-38e63be23e21465ad7d1765b708bd3673f38f36a.zip
Fix some build warnings and apply fix by Chris Coleman for HZ warning #303120 by Alexander Holler.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/procps/ChangeLog10
-rw-r--r--sys-process/procps/files/procps-3.2.8-forest-prefix.patch38
-rw-r--r--sys-process/procps/files/procps-3.2.8-linux-ver-init.patch23
-rw-r--r--sys-process/procps/procps-3.2.8-r2.ebuild88
4 files changed, 158 insertions, 1 deletions
diff --git a/sys-process/procps/ChangeLog b/sys-process/procps/ChangeLog
index b5d02fe6d124..2bc3d7054751 100644
--- a/sys-process/procps/ChangeLog
+++ b/sys-process/procps/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-process/procps
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.40 2010/09/22 15:24:08 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/ChangeLog,v 1.41 2010/11/21 20:16:28 vapier Exp $
+
+*procps-3.2.8-r2 (21 Nov 2010)
+
+ 21 Nov 2010; Mike Frysinger <vapier@gentoo.org> +procps-3.2.8-r2.ebuild,
+ +files/procps-3.2.8-forest-prefix.patch,
+ +files/procps-3.2.8-linux-ver-init.patch:
+ Fix some build warnings and apply fix by Chris Coleman for HZ warning
+ #303120 by Alexander Holler.
22 Sep 2010; Diego E. Pettenò <flameeyes@gentoo.org>
procps-3.2.8-r1.ebuild, +files/procps-3.2.8+gmake-3.82.patch:
diff --git a/sys-process/procps/files/procps-3.2.8-forest-prefix.patch b/sys-process/procps/files/procps-3.2.8-forest-prefix.patch
new file mode 100644
index 000000000000..915be67308b7
--- /dev/null
+++ b/sys-process/procps/files/procps-3.2.8-forest-prefix.patch
@@ -0,0 +1,38 @@
+avoid gcc warnings like:
+
+ps/output.c:341:6: warning: the address of ‘forest_prefix’ will always evaluate as ‘true’
+
+Index: ps/output.c
+===================================================================
+RCS file: /cvsroot/procps/procps/ps/output.c,v
+retrieving revision 1.63
+diff -u -p -r1.63 output.c
+--- ps/output.c 3 May 2009 06:39:33 -0000 1.63
++++ ps/output.c 14 Nov 2010 00:24:56 -0000
+@@ -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;
+@@ -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/files/procps-3.2.8-linux-ver-init.patch b/sys-process/procps/files/procps-3.2.8-linux-ver-init.patch
new file mode 100644
index 000000000000..6d4039c91088
--- /dev/null
+++ b/sys-process/procps/files/procps-3.2.8-linux-ver-init.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/303120
+
+make sure the linux version constructor runs before the libproc constructor
+since the latter uses variables setup by the former
+
+fix by Chris Coleman
+
+Index: proc/version.c
+===================================================================
+RCS file: /cvsroot/procps/procps/proc/version.c,v
+retrieving revision 1.7
+diff -u -p -r1.7 version.c
+--- proc/version.c 9 Feb 2003 07:27:16 -0000 1.7
++++ proc/version.c 14 Nov 2010 00:22:44 -0000
+@@ -33,7 +33,7 @@ void display_version(void) {
+
+ int linux_version_code;
+
+-static void init_Linux_version(void) __attribute__((constructor));
++static void init_Linux_version(void) __attribute__((constructor(100)));
+ static void init_Linux_version(void) {
+ static struct utsname uts;
+ int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
diff --git a/sys-process/procps/procps-3.2.8-r2.ebuild b/sys-process/procps/procps-3.2.8-r2.ebuild
new file mode 100644
index 000000000000..df087555f471
--- /dev/null
+++ b/sys-process/procps/procps-3.2.8-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2010 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-r2.ebuild,v 1.1 2010/11/21 20:16:28 vapier Exp $
+
+inherit flag-o-matic eutils toolchain-funcs multilib
+
+DESCRIPTION="Standard informational utilities and process-handling tools"
+HOMEPAGE="http://procps.sourceforge.net/"
+SRC_URI="http://procps.sourceforge.net/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="n32 unicode"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/3.2.5-top-sort.patch
+ epatch "${FILESDIR}"/procps-3.2.7-proc-mount.patch
+ epatch "${FILESDIR}"/procps-3.2.3-noproc.patch
+ epatch "${FILESDIR}"/procps-3.2.8-toprc-fixup.patch
+ epatch "${FILESDIR}"/procps-3.2.8+gmake-3.82.patch
+ epatch "${FILESDIR}"/procps-3.2.8-linux-ver-init.patch #303120
+ epatch "${FILESDIR}"/procps-3.2.8-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
+
+ # n32 isn't completly reliable of an ABI on mips64 at the current
+ # time. Eventually, it will be, but for now, we need to make sure
+ # procps doesn't try to force it on us.
+ if ! use n32 ; then
+ epatch "${FILESDIR}"/${PN}-3.2.6-mips-n32_isnt_usable_on_mips64_yet.patch
+ fi
+}
+
+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 "doins include"
+
+ 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
+}
+
+pkg_postinst() {
+ einfo "NOTE: With NPTL \"ps\" and \"top\" no longer"
+ einfo "show threads. You can use any of: -m m -L -T H"
+ einfo "in ps or the H key in top to show them"
+}