aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-06-11 18:16:08 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-06-11 18:16:08 -0400
commit8eddda8072add075ebf56cf6d288bc1450d6b5f8 (patch)
tree373e2d36142a298a821f6643c097007aa38aa29f /sys-process
downloadmusl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.gz
musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.tar.bz2
musl-8eddda8072add075ebf56cf6d288bc1450d6b5f8.zip
Initial migration from hardened-dev::musl
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/cronie/Manifest8
-rw-r--r--sys-process/cronie/cronie-1.4.12-r99.ebuild87
-rw-r--r--sys-process/cronie/files/0001-add_limits_h_and_MAXNAMLEN.patch15
-rw-r--r--sys-process/cronie/files/cronie-1.2-cron.deny5
-rw-r--r--sys-process/cronie/files/cronie-1.3-crontab16
-rw-r--r--sys-process/cronie/files/cronie-1.3-initd14
-rw-r--r--sys-process/cronie/files/cronie-1.4.3-pamd9
-rw-r--r--sys-process/cronie/metadata.xml20
-rw-r--r--sys-process/lsof/Manifest9
-rw-r--r--sys-process/lsof/files/lsof-4.85-arg.c.patch30
-rw-r--r--sys-process/lsof/files/lsof-4.85-cross.patch33
-rw-r--r--sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch11
-rw-r--r--sys-process/lsof/files/lsof-4.87-remove-glibc-check.patch15
-rw-r--r--sys-process/lsof/lsof-4.85-r99.ebuild81
-rw-r--r--sys-process/lsof/lsof-4.87-r99.ebuild98
-rw-r--r--sys-process/lsof/metadata.xml8
-rw-r--r--sys-process/procps/Manifest14
-rw-r--r--sys-process/procps/files/procps-3.3.6-error_at_line.patch12
-rw-r--r--sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch46
-rw-r--r--sys-process/procps/files/procps-3.3.8-no-GLOB_TILDE.patch12
-rw-r--r--sys-process/procps/files/procps-3.3.8-no-error_h.patch54
-rw-r--r--sys-process/procps/files/procps-3.3.9-configure.patch13
-rw-r--r--sys-process/procps/files/procps-3.3.9-no-error_h.patch64
-rw-r--r--sys-process/procps/metadata.xml8
-rw-r--r--sys-process/procps/procps-3.3.10-r99.ebuild63
-rw-r--r--sys-process/procps/procps-3.3.8-r99.ebuild56
-rw-r--r--sys-process/procps/procps-3.3.9-r99.ebuild56
-rw-r--r--sys-process/psmisc/Manifest4
-rw-r--r--sys-process/psmisc/files/psmisc-22.21-add-limits_h.patch11
-rw-r--r--sys-process/psmisc/metadata.xml5
-rw-r--r--sys-process/psmisc/psmisc-22.21-r99.ebuild56
31 files changed, 933 insertions, 0 deletions
diff --git a/sys-process/cronie/Manifest b/sys-process/cronie/Manifest
new file mode 100644
index 0000000..f80d017
--- /dev/null
+++ b/sys-process/cronie/Manifest
@@ -0,0 +1,8 @@
+AUX 0001-add_limits_h_and_MAXNAMLEN.patch 384 SHA256 9d9a64ac23fe90caf99e129a31ac8540a62860d3eedcaef6b4191b06d1667ffd SHA512 e1b4e7adb16658702685c34e23fa9ae6dcf7e5e48b670210e6a263110548e71872242a91351157283099d5116e599249dc619f2dfaf700425ce1e20b7e0fbf48 WHIRLPOOL f364cbd01759b07e6815c277fdec55c7e9cd6fa673db8894d1b2a51699df31417acb273adfd26c486359453a0c203a77fe620ded4b1ba9544e9edead36e938ad
+AUX cronie-1.2-cron.deny 216 SHA256 4a857b2c58bb10d4aefbdd7d4a41710456a8cc27774c365e361ca5271128e0b8 SHA512 88b4bf039d5677e9b63fffa5b40bcfb15bd5fe3e76db6ef8dabe2c7b2fe9f7c45ef8cc0fc2087457f5ec364bcc7dee7548df5b98f1c88cbf9df495b12a601a04 WHIRLPOOL 2f02d1db5b2650ca63345445010853016f1d397aa45c1031d0518fff3702e3eb3ed52b3835fa22f8a637a53b4de193ac74aa3ca190fa9739f161760d11398f44
+AUX cronie-1.3-crontab 833 SHA256 700714927dea9ed271924817863e9b45cb50b3dd650bd00e072f09aadc4c3684 SHA512 9c21d9ab6f7ae45f75b3f681abdfb043f1ba61c8522fb6cd2a6ffd32a628b3dc07c4011c1fbe43228016fe670d99a230ebdcac08d0ace12ec749cff4f2a85895 WHIRLPOOL 4c60338d73a6163812802b23377ec93dfe3a29339bd01d5f24fcd17ed4b749354d5660464d334c06b04de1cfd9540ba78d732695759fc0d8880904646030d984
+AUX cronie-1.3-initd 395 SHA256 292a7b20fe33bd027357475fea6aa1194afa7e5c1c47a85299db945b9d1c847e SHA512 e52ddbf1a7235aff7756478f807e5c10cccf729d9cbd52294db767b958a5640f3645f3f5784618b55aca302808755707d3eca667637c1f93a233aa83365f567f WHIRLPOOL 112e78802d59aac029d33e3ec8cb833b29417a13ab6212393f15f09b42906d56d92501ac8bad972e3fb91d9255067795b32f4fd0589cedfd2f337572cc2576c5
+AUX cronie-1.4.3-pamd 231 SHA256 c281c9b8fb4984e20142a7e099d7032192d5c2ca2eb02ece5eb4f73ca64593dd SHA512 32268d8b097e60eb039c023647ecd651b6940a8fe1587111ce0d49314bbb2de451214f98b7b703fd284e231c10bc4e616d4d0c63c107d9cdbc2bb470a17f2c3a WHIRLPOOL 171dbaa3a49aec2731d1cd78a1a4168369a1a0596b98049fd9c026ab9af54e97fdcf81416fa4fe8201c232dcdf891c4d3e81da20ddfa103eae458094c2095424
+DIST cronie-1.4.12.tar.gz 234214 SHA256 0f5c9bf32f352599451c4ca0d6bc076d19e73ecfa5a90b34ecfe47c918c8bafd SHA512 ff17c9a1ba39957727db390d28d21248f05414f55119094d99a646695698e1b148b920f3fc91e9733b862bc8ce226824d290fff51abe17410a0e63ab3b424865 WHIRLPOOL 61a6a7c3a660bbbb38ff2b7b700fe6fa84b1144d20d658e26f4cde522f6fc3faa6141f4cb176f78cfb22cfb50e17f2a945aeb382761ba2aa1b25e6e16ad20082
+EBUILD cronie-1.4.12-r99.ebuild 2057 SHA256 58371871d9c0a65c52ca53c8dc41d259f4f54c4f56940a97990158a72b6740b2 SHA512 af840fe9b6d998486fe9b4ee2a3a0a1e44c2a7f193bbd4cc8fb39481caffddd8176cb5c078080effdb1b35889b866e3490ea4af63caa950e4e9efcaa2b58e026 WHIRLPOOL e7a822818b4cc58f623d177ade7bea340b58a9cc200c97e5cde75d6e958a1b0d39cc242ea87027a47d3ea9c32070318d83074765d6dd58461d5832b2c2ba95b3
+MISC metadata.xml 799 SHA256 fe8f004016da48f9eaf570c4777bd407f210d468e8779d8db538b5fa1f0dad7d SHA512 9bae8c4edf33af2e6d25aa9db003d40525895dc21ca3388a303a7bba851a0bbe46ac0d254e0aa9c84da8f5c1d2b0e0042e1e317f717c1bd53fe388849366da82 WHIRLPOOL a9e7f4565bc909bc44dc4b676edc48794e8da7235a33b9289fcf53de65fb3406662560588d80fbed90873a9a56fcf00a0ec03fd80325ec2c8e56b9a38b66e01a
diff --git a/sys-process/cronie/cronie-1.4.12-r99.ebuild b/sys-process/cronie/cronie-1.4.12-r99.ebuild
new file mode 100644
index 0000000..026029f
--- /dev/null
+++ b/sys-process/cronie/cronie-1.4.12-r99.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/cronie-1.4.12.ebuild,v 1.4 2014/12/30 17:42:09 maekke Exp $
+
+EAPI=5
+
+inherit cron eutils pam systemd user
+
+DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron"
+SRC_URI="https://fedorahosted.org/releases/c/r/cronie/${P}.tar.gz"
+HOMEPAGE="https://fedorahosted.org/cronie/wiki"
+
+LICENSE="ISC BSD BSD-2 GPL-2"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="anacron +inotify pam selinux"
+
+DEPEND="pam? ( virtual/pam )
+ anacron? ( !sys-process/anacron )"
+RDEPEND="${DEPEND}"
+
+#cronie supports /etc/crontab
+CRON_SYSTEM_CRONTAB="yes"
+
+src_prepare() {
+ epatch "${FILESDIR}"/0001-add_limits_h_and_MAXNAMLEN.patch
+}
+
+pkg_setup() {
+ enewgroup crontab
+}
+
+src_configure() {
+ SPOOL_DIR="/var/spool/cron/crontabs" \
+ ANACRON_SPOOL_DIR="/var/spool/anacron" \
+ econf \
+ $(use_with inotify) \
+ $(use_with pam) \
+ $(use_with selinux) \
+ $(use_enable anacron) \
+ --enable-syscrontab \
+ --with-daemon_username=cron \
+ --with-daemon_groupname=cron
+}
+
+src_install() {
+ emake install DESTDIR="${D}"
+
+ docrondir -m 1730 -o root -g crontab
+ fowners root:crontab /usr/bin/crontab
+ fperms 2751 /usr/bin/crontab
+
+ insinto /etc/conf.d
+ newins "${S}"/crond.sysconfig ${PN}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}-1.3-crontab" crontab
+ newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny
+
+ keepdir /etc/cron.d
+ newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN}
+ newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond
+
+ sed s:sysconfig/crond:conf.d/cronie: contrib/cronie.systemd \
+ > "${T}"/cronie.service
+ systemd_dounit "${T}"/cronie.service
+
+ if use anacron ; then
+ local anacrondir="/var/spool/anacron"
+ keepdir ${anacrondir}
+ fowners root:cron ${anacrondir}
+ fperms 0750 ${anacrondir}
+
+ insinto /etc
+
+ doins contrib/anacrontab
+
+ insinto /etc/cron.hourly
+ doins contrib/0anacron
+ fperms 0750 /etc/cron.hourly/0anacron
+ fi
+
+ dodoc AUTHORS README contrib/*
+}
+
+pkg_postinst() {
+ cron_pkg_postinst
+}
diff --git a/sys-process/cronie/files/0001-add_limits_h_and_MAXNAMLEN.patch b/sys-process/cronie/files/0001-add_limits_h_and_MAXNAMLEN.patch
new file mode 100644
index 0000000..fdf721b
--- /dev/null
+++ b/sys-process/cronie/files/0001-add_limits_h_and_MAXNAMLEN.patch
@@ -0,0 +1,15 @@
+--- src/database.c 2015-01-10 13:17:11.253148769 +0000
++++ src/database.c 2015-01-10 13:18:45.491148769 +0000
+@@ -38,6 +38,12 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#if ! defined(__GLIBC__) && ! defined(__UCLIBC__)
++#include <limits.h>
++
++/* match gnu to posix */
++#define MAXNAMLEN NAME_MAX
++#endif
+
+ #ifdef WITH_INOTIFY
+ # include <sys/inotify.h>
diff --git a/sys-process/cronie/files/cronie-1.2-cron.deny b/sys-process/cronie/files/cronie-1.2-cron.deny
new file mode 100644
index 0000000..f909922
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.2-cron.deny
@@ -0,0 +1,5 @@
+# $Id: cronie-1.2-cron.deny,v 1.1 2009/02/17 22:09:35 bangert Exp $
+# If for any reason you have users in the 'cron' group who should not
+# be allowed to run crontab, add them to this file (one username per
+# line)
+
diff --git a/sys-process/cronie/files/cronie-1.3-crontab b/sys-process/cronie/files/cronie-1.3-crontab
new file mode 100644
index 0000000..b14eeda
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.3-crontab
@@ -0,0 +1,16 @@
+# for cronie
+# $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/files/cronie-1.3-crontab,v 1.2 2014/04/18 13:24:55 polynomial-c Exp $
+
+# Global variables
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+
+# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
+# if anacron is not present
+59 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.hourly
+9 3 * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.daily
+19 4 * * 6 root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.weekly
+29 5 1 * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.monthly
+*/10 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; }
diff --git a/sys-process/cronie/files/cronie-1.3-initd b/sys-process/cronie/files/cronie-1.3-initd
new file mode 100644
index 0000000..138530f
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.3-initd
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/cronie/files/cronie-1.3-initd,v 1.3 2014/03/04 00:17:58 polynomial-c Exp $
+
+command="/usr/sbin/crond"
+command_args="${CRONDARGS}"
+pidfile="/var/run/crond.pid"
+
+depend() {
+ use clock logger
+ need localmount
+ provide cron
+}
diff --git a/sys-process/cronie/files/cronie-1.4.3-pamd b/sys-process/cronie/files/cronie-1.4.3-pamd
new file mode 100644
index 0000000..e82be8d
--- /dev/null
+++ b/sys-process/cronie/files/cronie-1.4.3-pamd
@@ -0,0 +1,9 @@
+#
+# The PAM configuration file for the cron daemon
+#
+#
+auth include system-auth
+account required pam_access.so
+account include system-auth
+session required pam_loginuid.so
+session include system-auth
diff --git a/sys-process/cronie/metadata.xml b/sys-process/cronie/metadata.xml
new file mode 100644
index 0000000..79ee246
--- /dev/null
+++ b/sys-process/cronie/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>cron</herd>
+<maintainer>
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+</maintainer>
+ <longdescription lang="en">
+ Cronie contains the standard UNIX daemon crond that runs specified programs at
+ scheduled times and related tools. It is based on the original cron and
+ has security and configuration enhancements like the ability to use pam and
+ SELinux.
+ And why cronie? See http://www.urbandictionary.com/define.php?term=cronie
+ </longdescription>
+ <use>
+ <flag name='anacron'>Install the periodic anacron command scheduler.</flag>
+ <flag name='inotify'>Enable inotify filesystem monitoring support.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-process/lsof/Manifest b/sys-process/lsof/Manifest
new file mode 100644
index 0000000..bbecd3a
--- /dev/null
+++ b/sys-process/lsof/Manifest
@@ -0,0 +1,9 @@
+AUX lsof-4.85-arg.c.patch 703 SHA256 a517f97ae897dc1d1c7c4e1eeb2fe4a4dab646004c07457709f823e41e57bd43 SHA512 fa0b510e02647ae13515491240f7a2aa169c19f14a3a02ac9735a067ca509613a0aaf00b4f01e8f00a032a6320d15495d876fad3b4903c48df926ef5e8a397df WHIRLPOOL 80ee5f343120caa1ef104d6c0d542357eccf7e14981605cb8f5f82206e17a5f6d25675e3aeeb9c3cfdaa51e8c781aed8273f5e99dab115e0af926cfb0521353f
+AUX lsof-4.85-cross.patch 1000 SHA256 5067c73c65d9cbe75213572423d0ddea02a12ba7f3509767082cd9b6faf8b174 SHA512 399df859f225a69a7211c81439883afba38562d72b0d320dcf19acf7b705031963e97469a322af919d05aa14af501af6137301c24a29f871f59253c6d6a647d7 WHIRLPOOL b258a537f44d24c3e2bbc771476e98f79a3bcbf9b4d9d1e0f2779f9eae75e0a19eb8348a0d23ca2c9ad4d1835b859ec4f6ded74fd9fd5b8594d19bb1c8ff086b
+AUX lsof-4.85-fix-missing-netinet_tcp_h.patch 387 SHA256 b95910ad1b98e1b2a7b18abcc2bdebf25d2bffafa3005a51aaf4a9fa039f869a SHA512 d2cc166b97fcb47bde060f762953e296a1fb75a3460f416dc4e436a01e4f9efd0c6332c1cb471017abf252bd27272bd6a9c832f137e156b168c348ee3baee8d8 WHIRLPOOL 37f18c2ed5c2130dd12a8723e59573d3d144e8131ac12e77dba995ad2d87398071809726f63b7eeadb1b9b863bbbc3f494f2843034910b68d9a3102860c21104
+AUX lsof-4.87-remove-glibc-check.patch 514 SHA256 c90a71adbdcc5fb6d32b7469196315cc5b6c1b71f351eef748b899ec3ea89671 SHA512 34efacf57c8e3bd1fa0f84ce58b8046177cb6dd075840837ea3f104570c63ceb9b7491bba8524b6c712440c86f11dc1a2d5bf475703c59345c4cb9c5624cabe6 WHIRLPOOL dea979075595f26a8d03b09857ac9ffab9602dc4c39bafd6fdb8f804ae5d9d4f7dd282771522169ed4cbf236cc186f7677e20eb8ae44b0058dc1062f4656e23a
+DIST lsof_4.85.tar.bz2 763397 SHA256 49aa58e63539c45bada514a6a2e5a1c9f946ada1f4137dc9154cf4bf6054a1c1 SHA512 f38356d300e18feaac09043f19c3ef612ac22cb89608cbecbc3594dd170705be855ebc5ce80b069db4a5af9bb517b1f4e571c2e175aa579214014d7f77ac30cb WHIRLPOOL 7cc1476bae92699b5b52e2e9a31713840308768b9536d2f4c904439458cd8778311facafffeea93f743db4488dc296fccfaf852d739f2b68859e10031289a6d3
+DIST lsof_4.87.tar.bz2 773664 SHA256 dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c SHA512 5e811225dd65366e3ef49628d567864fadda1dbda2d66a5e473123e73c468f5a3a577ae4e1b701a55ac49c2a759dab5c413663121c260a2804fca10ece902766 WHIRLPOOL 4ef01b855dbd8418e1533ebb293c3faacfa38c7a3cd30436d0a8174a974b7cd0eebfb79b23c4c3f13b66a65813a6fbdf5aa483d3f8d2689325fe7d0f48bfb5eb
+EBUILD lsof-4.85-r99.ebuild 2396 SHA256 e9103045427f760b42a906bfa8ad29fd79c4ad40587fd37bb4d7f7d8986737a3 SHA512 5afc59a98315c2c26eaf28ce2c2aa99719b3c49845eb3f163b79ad74442e1cf06c2d3bf27359f707829c1a850aa1d4994aa6419c7fd7873f7aff6e984243e918 WHIRLPOOL 8b9b2bb379c5e68bfa6c63e5c46f5085f680d3c285aa5bd381ebba6c90e39a592113d07206ef7634a40f3b948a64f864adeff9f074dd62b660d4757ae197e3be
+EBUILD lsof-4.87-r99.ebuild 2939 SHA256 875f3a3317470458290d62cbe45a39a7e159e5affaf11c9d1b6056fd29634102 SHA512 001699b94b3dfc8f6dc80d42ef96ebd48db6663e8946e709f21b228bfe9a23fc41a6efd2a3cbcae77063cadc56429993f4f41b2f8076ebfef7340a210daeda02 WHIRLPOOL f0aab68fac77f221ff9a26d800ef77c4e004c3a0d9b463f40344cee0dd4bbdc9944d53c8c81998eb49388d90ab7d1a3339e9f252a87bde9a7c7d4a174f828567
+MISC metadata.xml 238 SHA256 27f27d7c7ba9fb670a6867a79ff8af354e48735f9bd672d387d96b4bd49d415b SHA512 b8434ca8a5f116234268cca5c8d7cf20b3187e1f2c326bfe3693e2e85c2dac961618b39a20d0d5b7a01744b5159057e2861eeaff7fef6a08e0fc4c1b47bbf778 WHIRLPOOL f3ada27de4f86d469929230f1649727d91cc303e007ae728038062a04522053f0b49559d5bc4b6dd203744ba117d1577d03d62a1cb5d7c24c86c268edf057761
diff --git a/sys-process/lsof/files/lsof-4.85-arg.c.patch b/sys-process/lsof/files/lsof-4.85-arg.c.patch
new file mode 100644
index 0000000..98838cd
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.85-arg.c.patch
@@ -0,0 +1,30 @@
+arg.c.patch Patches: lsof_4.85_src/arg.c
+
+ Importance: major for all dialects supporting
+ the +|-e option (e.g., Linux)
+
+ Function: this patch corrects a bug in the
+ accumulation of multiple +|-e
+ option values
+
+*** /tmp/T0iAaaeo Thu Oct 20 14:08:43 2011
+--- arg.c Thu Oct 20 14:03:49 2011
+***************
+*** 778,785 ****
+ ep->pathl = i;
+ ep->rdlnk = rdlnk;
+ ep->mp = (struct mounts *)NULL;
+! if (!(ep->next = Efsysl))
+! Efsysl = ep;
+ return(0);
+ }
+ #endif /* defined(HASEOPT) */
+--- 778,785 ----
+ ep->pathl = i;
+ ep->rdlnk = rdlnk;
+ ep->mp = (struct mounts *)NULL;
+! ep->next = Efsysl;
+! Efsysl = ep;
+ return(0);
+ }
+ #endif /* defined(HASEOPT) */
diff --git a/sys-process/lsof/files/lsof-4.85-cross.patch b/sys-process/lsof/files/lsof-4.85-cross.patch
new file mode 100644
index 0000000..186c6d8
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.85-cross.patch
@@ -0,0 +1,33 @@
+let the preprocessor work its magic rather than executing the code
+
+https://bugs.gentoo.org/432120
+
+--- a/Configure
++++ b/Configure
+@@ -2730,20 +2730,17 @@ LOCKF_OWNER4
+ rm -f ${LSOF_TMPC}.*
+ cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1
+ #include <features.h>
+-main() {
++#undef XXX
+ #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+-printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__);
++XXX: __GLIBC__ * 100 + __GLIBC_MINOR__
+ #elif defined(__GLIBC__)
+-printf("-DGLIBCV=%d00\n",__GLIBC__);
+-#else
+-printf("\n");
++XXX: __GLIBC__ * 100
+ #endif
+-return(0); }
+ .LSOF_END_HERE_DOC1
+- $LINUX_CONF_CC ${LSOF_TMPC}.c -I$LSOF_INCLUDE -o ${LSOF_TMPC}.x > /dev/null 2>&1
++ $LINUX_CONF_CC ${LSOF_TMPC}.c -E -I$LSOF_INCLUDE 2>/dev/null | sed -n '/^XXX:/s|.*:||p' > ${LSOF_TMPC}.x
+- if test -x ${LSOF_TMPC}.x # {
++ if test -s ${LSOF_TMPC}.x # {
+ then
+- LINUX_CLIB=`${LSOF_TMPC}.x`
++ LINUX_CLIB="-DGLIBCV=$(( `cat ${LSOF_TMPC}.x` ))"
+ LSOF_TMP=$?
+ else
+ LINUX_CLIB=""
diff --git a/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch b/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch
new file mode 100644
index 0000000..919c7ae
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.85-fix-missing-netinet_tcp_h.patch
@@ -0,0 +1,11 @@
+diff -Naur lsof_4.85.orig/lsof_4.85_src/lsof.h lsof_4.85/lsof_4.85_src/lsof.h
+--- lsof_4.85.orig/lsof_4.85_src/lsof.h 2011-09-07 19:14:10.000000000 +0000
++++ lsof_4.85/lsof_4.85_src/lsof.h 2014-02-21 19:31:43.322452780 +0000
+@@ -53,6 +53,7 @@
+ #include <locale.h>
+ # endif /* defined(HASSETLOCALE) */
+
++#include <netinet/tcp.h>
+ #include <netdb.h>
+ #include <pwd.h>
+ #include <stdio.h>
diff --git a/sys-process/lsof/files/lsof-4.87-remove-glibc-check.patch b/sys-process/lsof/files/lsof-4.87-remove-glibc-check.patch
new file mode 100644
index 0000000..1e121cb
--- /dev/null
+++ b/sys-process/lsof/files/lsof-4.87-remove-glibc-check.patch
@@ -0,0 +1,15 @@
+--- a/lsof_4.87_src/dialects/linux/dlsof.h 2015-02-28 22:37:00.731421615 +0000
++++ b/lsof_4.87_src/dialects/linux/dlsof.h 2015-02-28 22:37:57.585422124 +0000
+@@ -49,12 +49,7 @@
+ #include <setjmp.h>
+ #include <unistd.h>
+ #include <netinet/in.h>
+-
+-# if defined(GLIBCV) || defined(__UCLIBC__)
+ #include <netinet/tcp.h>
+-# else /* !defined(GLIBCV) && !defined(__UCLIBC__) */
+-#include <linux/tcp.h>
+-# endif /* defined(GLIBCV) || defined(__UCLIBC__) */
+
+ # if !defined(HASNORPC_H)
+ #include <rpc/rpc.h> \ No newline at end of file
diff --git a/sys-process/lsof/lsof-4.85-r99.ebuild b/sys-process/lsof/lsof-4.85-r99.ebuild
new file mode 100644
index 0000000..5382919
--- /dev/null
+++ b/sys-process/lsof/lsof-4.85-r99.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.85-r2.ebuild,v 1.12 2014/01/20 06:40:56 vapier Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="Lists open files for running Unix processes"
+HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/"
+SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2
+ ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2
+ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/${MY_P}.tar.bz2"
+
+LICENSE="lsof"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="examples ipv6 rpc selinux static"
+
+RDEPEND="rpc? ( net-libs/libtirpc )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ rpc? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/${MY_P}/${MY_P}_src
+
+src_unpack() {
+ unpack ${A}
+ cd ${MY_P}
+ unpack ./${MY_P}_src.tar
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fix-missing-netinet_tcp_h.patch #for musl
+ epatch "${FILESDIR}"/${P}-arg.c.patch #388555
+ epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120
+ # convert `test -r header.h` into a compile test
+ sed -i -r \
+ -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \
+ -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \
+ Configure || die
+}
+
+target() { usex kernel_FreeBSD freebsd linux ; }
+src_configure() {
+ use static && append-ldflags -static
+
+ append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H")
+ append-cppflags $(usex ipv6 -{D,U}HASIPv6)
+
+ export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \
+ $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)"
+
+ # Set LSOF_INCLUDE to a dummy location so the script doesn't poke
+ # around in it and mix /usr/include paths with cross-compile/etc.
+ touch .neverInv
+ LINUX_HASSELINUX=$(usex selinux y n) \
+ LSOF_INCLUDE=${T} \
+ LSOF_CC=$(tc-getCC) \
+ LSOF_AR="$(tc-getAR) rc" \
+ LSOF_RANLIB=$(tc-getRANLIB) \
+ LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \
+ ./Configure -n $(target) || die
+}
+
+src_compile() {
+ emake DEBUG="" all || die
+}
+
+src_install() {
+ dobin lsof || die
+
+ if use examples ; then
+ insinto /usr/share/lsof/scripts
+ doins scripts/* || die
+ fi
+
+ doman lsof.8 || die
+ dodoc 00*
+}
diff --git a/sys-process/lsof/lsof-4.87-r99.ebuild b/sys-process/lsof/lsof-4.87-r99.ebuild
new file mode 100644
index 0000000..dd3753b
--- /dev/null
+++ b/sys-process/lsof/lsof-4.87-r99.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/lsof/lsof-4.87-r1.ebuild,v 1.13 2014/12/06 16:38:45 ago Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_P=${P/-/_}
+DESCRIPTION="Lists open files for running Unix processes"
+HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/"
+SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2
+ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2"
+
+LICENSE="lsof"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples ipv6 rpc selinux static"
+
+RDEPEND="rpc? ( net-libs/libtirpc )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ rpc? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/${MY_P}/${MY_P}_src
+
+src_unpack() {
+ unpack ${A}
+ cd ${MY_P}
+ unpack ./${MY_P}_src.tar
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.87-remove-glibc-check.patch #for musl
+ epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120
+ # convert `test -r header.h` into a compile test
+ sed -i -r \
+ -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \
+ -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \
+ Configure || die
+}
+
+target() {
+ case ${CHOST} in
+ *-darwin*) echo darwin ;;
+ *-freebsd*) echo freebsd ;;
+ *-solaris*) echo solaris ;;
+ *-aix*) echo aixgcc ;;
+ *) echo linux ;;
+ esac
+}
+
+src_configure() {
+ use static && append-ldflags -static
+
+ append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H")
+ append-cppflags $(usex ipv6 -{D,U}HASIPv6)
+
+ export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \
+ $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)"
+
+ # Set LSOF_INCLUDE to a dummy location so the script doesn't poke
+ # around in it and mix /usr/include paths with cross-compile/etc.
+ touch .neverInv
+ LINUX_HASSELINUX=$(usex selinux y n) \
+ LSOF_INCLUDE=${T} \
+ LSOF_CC=$(tc-getCC) \
+ LSOF_AR="$(tc-getAR) rc" \
+ LSOF_RANLIB=$(tc-getRANLIB) \
+ LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \
+ ./Configure -n $(target) || die
+}
+
+src_compile() {
+ emake DEBUG="" all
+}
+
+src_install() {
+ dobin lsof
+
+ if use examples ; then
+ insinto /usr/share/lsof/scripts
+ doins scripts/*
+ fi
+
+ doman lsof.8
+ dodoc 00*
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ einfo "Note: to use lsof on Solaris you need read permissions on"
+ einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys"
+ elif [[ ${CHOST} == *-aix* ]] ; then
+ einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and"
+ einfo "/dev/kmem, i.e. you need to be root, or to be in the group system"
+ fi
+}
diff --git a/sys-process/lsof/metadata.xml b/sys-process/lsof/metadata.xml
new file mode 100644
index 0000000..49fb858
--- /dev/null
+++ b/sys-process/lsof/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<use>
+ <flag name='rpc'>support looking up RPC service info</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-process/procps/Manifest b/sys-process/procps/Manifest
new file mode 100644
index 0000000..e3aabc0
--- /dev/null
+++ b/sys-process/procps/Manifest
@@ -0,0 +1,14 @@
+AUX procps-3.3.6-error_at_line.patch 325 SHA256 642eb70e9165f3cf18b7ca3afe370f93991b32bc0271c9e1064c774dd2fadbb3 SHA512 fd0fd437deb7c1ac683ca90f3e94d14b35f3e9d19422e84f59b74d7530f204a04a289e5397d986536adffb2a30611ec5a8486bc9f01a32708d9025d3fb7c98b9 WHIRLPOOL f0f2da5452a8a1817a48a76723f6d02eddb856e8e69bac8ec8d87891a7f94f10c8945dba5c501cdc0d3f52fe690940524d0ae2c32868a3aa48155e54ffd2c3af
+AUX procps-3.3.8-kill-neg-pid.patch 1446 SHA256 847c21f6619c7aa0f2847726a17595f986ec2fe0f361d95e17812639abe32a79 SHA512 3ed4e83d81f7dd574ff68bbcae9ad9f8649a39d46a17de5fd4297f215d8f70cd28e415b1d3c7b5142e7719343af28f4b393061a60eb012caece81dfe5ff6c271 WHIRLPOOL cf452118312e60a0bab7a4ec87bed9a9d2f5fb8bb563769a0430f11c72348e5be79bdfc031f67f4e97e0bf9b32f6ccd1ac590f392c95ee935b77b857ce1b1739
+AUX procps-3.3.8-no-GLOB_TILDE.patch 466 SHA256 17b3e7360d740c97b842e1c68cd863bb66b13b1539b6ead7435d75c1daf5f48a SHA512 9fc13cff6c310080f5af8a2fa83e88d88ff741046c988ae806ce010b37cfd38a770726bc98bb50b9532c5c1679f7da45b12803f55e4e40638daf4dd55c58b84f WHIRLPOOL d791950607fd06a8bfeccf21fd17a454f3c3a207f562bcebdd1c521f0afecdd8a358dec8a4277951eed0f71a7210ba89bae2f9e8887043e39169aab7bd9c6269
+AUX procps-3.3.8-no-error_h.patch 1394 SHA256 2535f3cafc047aff6ddb879dc31479d95b445130471934a48d9aaa25835b91f3 SHA512 0c4dd060f93dca15fc36a0a4640909dd1782dc7af96ada62ec42a0d4f2831ccd1e274c14136d0df679b7066316dc44203267c077a875f6183df131b90c6f2a26 WHIRLPOOL 8232a4c92687ea8334ab933947fee107a1e7d712dbd3dbff4030353e41fd83384772b24a6acaa8335245205d06dedcf3ad28a5f642dd141882a73332d5c36920
+AUX procps-3.3.9-configure.patch 462 SHA256 d5d1274b7a41d2e2c6ccdada90f5107cbbc416b6b977e44da3bde2e299085ab2 SHA512 197c22cd86e601f77a6fa86d6bfcae6019982d4faad50aaf1c002d093f961cb8f664169b8b90f17572511c7fdd2b3afe6cc655793abf8bce4257c603be47ade5 WHIRLPOOL 6ee6d5ad2c24a17722613847fced3e6d962f1a4f4af3f4bc9c87aec269ee43f825effcb5308f496a9c78f8ea61ca8295ff598142ee005abeaee62a9b76ee0da9
+AUX procps-3.3.9-no-error_h.patch 1587 SHA256 0ed0d24f05ff23f83bd8cafa45e07cd015d45b394dadad76f3deea2316211465 SHA512 f05db99409189c3e284d65faa7ca9d267ab8cb111d5958bb722f57919fe45cbb00332d0c1b1f9f666b492ba657e0ea6bf931b9c71d4dfc5b69775fcf18acf480 WHIRLPOOL f41d32288b340e8de389034b60afd6b3b011f565e63b27b98d429fe4be1f73e90a72f35e550706dc5d5f856e4b9b540b6cfcbc4ec504ae3aea9ff374d86027d8
+DIST procps-3.3.8-respect_epipe_in_fileutils.patch 1412 SHA256 4a56c88697fa6099a62a4169838c9c04df2c2c2bbc08e9ad9953e5b00df16d68 SHA512 317fc8e7c3fbd280182f55b399a30b2cfbc72268590825ea323537361cd761776afe1486509cb04ae937287ccf11578def5aac2eaa0fe660d04f0357282d9c14 WHIRLPOOL f8fdac8a172037edf51e1e777374293848afaa2180adc35adce5bf8ebefceb37df30082b27f6d6f1f5a571ba0f84bdfff9fc6c2343f120ce5c80b2f52e1804ac
+DIST procps-ng-3.3.10.tar.xz 657232 SHA256 1759229cd0d97da3d200d5599c4ea82726d61fae9c4b7d3edd52c544962791b7 SHA512 cbfa49e79a88a8e7066a9c316ef089f15fa825c5bfbc22ab8a83f53c6f367a7c586cef9c403e360d373d824c471533a15ddb11cd30c561650e6879fe687e7e4f WHIRLPOOL 723dd1c00578a7fa7e3ff47bed60283c30850cc8ae8069c704ba648792809a67c5944dbfd9b7b0159e0be83215b61e6b71b2d76e65b3619aed54223900ffed9b
+DIST procps-ng-3.3.8.tar.xz 553056 SHA256 a4109cfb6fe3bcfb5a0efb37efe04d0c8ce858bff3820d48cc258bad41bed46b SHA512 63ba13f9ef0f4558748c6b2d1b0719a1173bd87e38279e3b052a10e207e1b808626d031f16dd65b05c55708366df7350cb0a64da8dc20e7f9f1fdc1cd2417c71 WHIRLPOOL 671860af1f028c9c8c7bb0c035db86e3e13d9d754801e7a3f19105710bb9720bbfa627e4e748b823192286319fe4e7e736c1af5a3fb34116cbe93386b0d2bed6
+DIST procps-ng-3.3.9.tar.xz 560812 SHA256 00f0cb0fadf968ddf605b0ef119846af07386629244d4f3da711a2cecf4e8663 SHA512 62c7270aa48b4346a3198f306d1cb8474f64650bfb67e8cc6c4d41923e50c31c95b3a0367a464823fb50a6137ec0c6352006292ac85b50caf730ec8ec35eb553 WHIRLPOOL dac97433a87badd40b46e3155bf0e30652ed2961a41bc8fca074357431301d250632215512ad752634c9c4f3273a1c75caba1ecf4f5a3c510bee155660dde166
+EBUILD procps-3.3.10-r99.ebuild 1909 SHA256 6ecaab61ee1932be7331c310762213cf8bbc3d7a4223a7b6fbaed478334c4c0a SHA512 21014530561f93884034b8b1e1fa694e459b14888153817221bdb5be6a4423d480971cf2715fb3881f830d044fb2d5ed84e648a2d8c65165770ae2ddd3ab6fcf WHIRLPOOL 952c44f05eda80ed1172a60d3617a4343b050d23b4f88934887bbf8f5e8dacf93c91c1b566d58db656559f696f53cf97c6934822fedd8063ab3827437c73b115
+EBUILD procps-3.3.8-r99.ebuild 1818 SHA256 fd06e9254f0216b401346463268112c9bf9a008c73d8407fe78d005437b4aed7 SHA512 44811f384402b264d1474775db477edf28f733d1b1785326d609e1d6ce0be5da1c72037db51283456e2ff90b6ee58009015e259812aeb2854309a69a1561545e WHIRLPOOL 7405808b4178630c047a4bd14776cc22c88a4c49de70d788aae333670d0277db39b5901197fbcd4c22a9f3f6df6726e96dffff3d5a7d79f53f35755c0a41a282
+EBUILD procps-3.3.9-r99.ebuild 1698 SHA256 10d81de372db3c00a1e3bc5e1d88e8200cc58f16f2fbbbe0886403f4421d565e SHA512 cb44fd715fdf82d62789dce81bc49a796eedce0bcfd1ed682bd7bbb23223a8c8b02137231f1dbd4c3c267410042609c357b976cbf4697a105cbd3879a6f8a1b1 WHIRLPOOL 2c86fa70f08158601318f18a1fb8a5cc3ceca79e651935be3e9fdef86920578809eae9872fafd34349c2c474e3ea0b23ac2d81169e154b02d563b62d5ca06a13
+MISC metadata.xml 259 SHA256 0bb63eb156063b66b45ac343be2ccf262f08ea0a9d247e8b1428d2f413c978c2 SHA512 b3ffc0288a73615eb2a24f7af77fa63781c3b6d713a2ba47d4bf83accf7d82bcb029e24cea7600b1ecc94de723f51b20fda082cf22d5b48dc05e98bd6eea6017 WHIRLPOOL 5339d46eb28ba6d6e413e6c79ea8c4c174379b0a99baa990c9f5e18c199113b96e5028437e3d175087d19730869cad704b34c10fc0714a88cea00517ce85dc92
diff --git a/sys-process/procps/files/procps-3.3.6-error_at_line.patch b/sys-process/procps/files/procps-3.3.6-error_at_line.patch
new file mode 100644
index 0000000..4329a49
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.6-error_at_line.patch
@@ -0,0 +1,12 @@
+ps/display.c:65:7: warning: implicit declaration of function ‘error_at_line’ [-Wimplicit-function-declaration]
+
+--- ps/display.c
++++ ps/display.c
+@@ -25,6 +25,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <error.h> /* error_at_line */
+
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
diff --git a/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
new file mode 100644
index 0000000..0039748
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch
@@ -0,0 +1,46 @@
+From 396cbc4cf36166217d877e2ff7e0a290758b0bc2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 27 Jun 2013 18:37:17 -0400
+Subject: [PATCH] kill: fix -PID handling
+
+Commit 19b6f48990b02aeca211b480625b95b2033c1017 tried to fix -PID
+handling, but the new logic ends up skipping over the arg. This is
+because getopt increments optind after it processed the -PID (even
+though it was an unknown option). We need to decrement it by one
+so the loop at the end of the code will process it for us.
+
+I also fixed some whitespace errors in that same commit.
+
+URL: http://code.google.com/p/chromium/issues/detail?id=255209
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ skill.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/skill.c b/skill.c
+index fb57305..074c5d7 100644
+--- a/skill.c
++++ b/skill.c
+@@ -390,7 +390,7 @@ static void __attribute__ ((__noreturn__))
+ else
+ sigopt++;
+
+- opterr=0; /* suppress errors on -123 */
++ opterr = 0; /* suppress errors on -123 */
+ while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1)
+ switch (i) {
+ case 'l':
+@@ -423,7 +423,9 @@ static void __attribute__ ((__noreturn__))
+ xwarnx(_("invalid argument %c"), optopt);
+ kill_usage(stderr);
+ }
+- loop=0;
++ /* We need to back off by one since getopt() ate the -PID */
++ --optind;
++ loop = 0;
+ break;
+ default:
+ kill_usage(stderr);
+--
+1.8.2.1
+
diff --git a/sys-process/procps/files/procps-3.3.8-no-GLOB_TILDE.patch b/sys-process/procps/files/procps-3.3.8-no-GLOB_TILDE.patch
new file mode 100644
index 0000000..09af420
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.8-no-GLOB_TILDE.patch
@@ -0,0 +1,12 @@
+diff -Nuar procps-ng-3.3.8.orig/sysctl.c procps-ng-3.3.8/sysctl.c
+--- procps-ng-3.3.8.orig/sysctl.c 2013-05-25 21:39:41.000000000 +0000
++++ procps-ng-3.3.8/sysctl.c 2014-01-17 16:28:37.241303653 +0000
+@@ -500,7 +500,7 @@
+ int globerr;
+ int j;
+
+- globerr = glob(filename, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf);
++ globerr = glob(filename, GLOB_NOCHECK, NULL, &globbuf);
+ if (globerr != 0 && globerr != GLOB_NOMATCH)
+ xerr(EXIT_FAILURE, _("glob failed"));
+
diff --git a/sys-process/procps/files/procps-3.3.8-no-error_h.patch b/sys-process/procps/files/procps-3.3.8-no-error_h.patch
new file mode 100644
index 0000000..e6ca793
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.8-no-error_h.patch
@@ -0,0 +1,54 @@
+diff -Naur procps-ng-3.3.8.orig/ps/display.c procps-ng-3.3.8/ps/display.c
+--- procps-ng-3.3.8.orig/ps/display.c 2013-05-25 21:39:40.000000000 +0000
++++ procps-ng-3.3.8/ps/display.c 2014-01-17 14:43:26.027950754 +0000
+@@ -25,7 +25,12 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++
++#if HAVE_ERROR_H
+ #include <error.h>
++#else
++#include <err.h>
++#endif
+
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+@@ -63,7 +68,11 @@
+ case SIGUSR2:
+ exit(EXIT_FAILURE);
+ default:
++#if HAVE_ERROR_H
+ error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
++#else
++ err(1, "%s:%d: %s", __FILE__, __LINE__, _("please report this bug"));
++#endif
+ signal(signo, SIG_DFL); /* allow core file creation */
+ kill(getpid(), signo);
+ }
+--- procps-ng-3.3.8.orig/ps/global.c 2013-05-25 21:39:40.000000000 +0000
++++ procps-ng-3.3.8/ps/global.c 2014-01-17 14:42:00.972945998 +0000
+@@ -25,7 +27,12 @@
+ #include <string.h>
+ #include <termios.h>
+ #include <unistd.h>
++
++#if HAVE_ERROR_H
+ #include <error.h>
++#else
++#include <err.h>
++#endif
+
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+@@ -522,6 +529,10 @@
+ unsigned int linenum,
+ const char *message)
+ {
++#if HAVE_ERROR_H
+ error_at_line(0, 0, filename, linenum, "%s", message);
++#else
++ err(1, "%s:%d: %s", filename, linenum, message);
++#endif
+ exit(EXIT_FAILURE);
+ }
diff --git a/sys-process/procps/files/procps-3.3.9-configure.patch b/sys-process/procps/files/procps-3.3.9-configure.patch
new file mode 100644
index 0000000..4822f62
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.9-configure.patch
@@ -0,0 +1,13 @@
+--- a/procps-ng-3.3.9/configure.ac
++++ b/procps-ng-3.3.9/configure.ac
+@@ -235,7 +235,9 @@
+ else
+ AC_SEARCH_LIBS([dlopen], [dl], [],
+ [AC_MSG_ERROR([dynamic linking unavailable, circumvent with --disable-numa])])
+- DL_LIB="$ac_cv_search_dlopen"
++ if test "$ac_cv_search_dlopen" != "none required" ; then
++ DL_LIB="$ac_cv_search_dlopen"
++ fi
+ fi
+ AC_SUBST([DL_LIB])
+
diff --git a/sys-process/procps/files/procps-3.3.9-no-error_h.patch b/sys-process/procps/files/procps-3.3.9-no-error_h.patch
new file mode 100644
index 0000000..070e1fe
--- /dev/null
+++ b/sys-process/procps/files/procps-3.3.9-no-error_h.patch
@@ -0,0 +1,64 @@
+diff -aur a/procps-ng-3.3.9/lib/nsutils.c b/procps-ng-3.3.9/lib/nsutils.c
+--- a/procps-ng-3.3.9/lib/nsutils.c
++++ b/procps-ng-3.3.9/lib/nsutils.c
+@@ -1,5 +1,4 @@
+ #include <errno.h>
+-#include <error.h>
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+diff -aur a/procps-ng-3.3.9/ps/display.c b/procps-ng-3.3.9/ps/display.c
+--- a/procps-ng-3.3.9/ps/display.c
++++ b/procps-ng-3.3.9/ps/display.c
+@@ -25,7 +25,12 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++
++#if HAVE_ERROR_H
+ #include <error.h>
++#else
++#include <err.h>
++#endif
+
+ #include <sys/sysmacros.h>
+ #include <sys/types.h>
+@@ -63,7 +68,11 @@
+ case SIGUSR2:
+ exit(EXIT_FAILURE);
+ default:
++#if HAVE_ERROR_H
+ error_at_line(0, 0, __FILE__, __LINE__, "%s", _("please report this bug"));
++#else
++ err(1, "%s:%d: %s", __FILE__, __LINE__, _("please report this bug"));
++#endif
+ signal(signo, SIG_DFL); /* allow core file creation */
+ kill(getpid(), signo);
+ }
+diff -aur a/procps-ng-3.3.9/ps/global.c b/procps-ng-3.3.9/ps/global.c
+--- a/procps-ng-3.3.9/ps/global.c
++++ b/procps-ng-3.3.9/ps/global.c
+@@ -25,7 +25,12 @@
+ #include <string.h>
+ #include <termios.h>
+ #include <unistd.h>
++
++#if HAVE_ERROR_H
+ #include <error.h>
++#else
++#include <err.h>
++#endif
+
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+@@ -522,6 +527,10 @@
+ unsigned int linenum,
+ const char *message)
+ {
++#if HAVE_ERROR_H
+ error_at_line(0, 0, filename, linenum, "%s", message);
++#else
++ err(1, "%s:%d: %s", filename, linenum, message);
++#endif
+ exit(EXIT_FAILURE);
+ }
diff --git a/sys-process/procps/metadata.xml b/sys-process/procps/metadata.xml
new file mode 100644
index 0000000..16e9fa3
--- /dev/null
+++ b/sys-process/procps/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<use>
+ <flag name='ncurses'>Build programs that use ncurses: top, slabtop, watch</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-process/procps/procps-3.3.10-r99.ebuild b/sys-process/procps/procps-3.3.10-r99.ebuild
new file mode 100644
index 0000000..9c1b4d8
--- /dev/null
+++ b/sys-process/procps/procps-3.3.10-r99.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/procps-3.3.10-r1.ebuild,v 1.1 2014/09/24 06:14:53 polynomial-c Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="standard informational utilities and process-handling tools"
+# http://packages.debian.org/sid/procps
+HOMEPAGE="http://procps.sourceforge.net/ http://gitorious.org/procps"
+# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz"
+#FEDORA_HASH="0980646fa25e0be58f7afb6b98f79d74"
+#SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz"
+SRC_URI="http://dev.gentoo.org/~polynomial-c/${PN}-ng-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips x86"
+IUSE="+ncurses modern-top nls selinux static-libs systemd test"
+
+RDEPEND="!<sys-apps/sysvinit-2.88-r6
+ ncurses? ( >=sys-libs/ncurses-5.7-r7 )
+ selinux? ( sys-libs/libselinux )
+ systemd? ( >=sys-apps/systemd-209 )"
+DEPEND="${RDEPEND}
+ ncurses? ( virtual/pkgconfig )
+ systemd? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )"
+
+S=${WORKDIR}/${PN}-ng-${PV}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch
+ sed -i -e 's:systemd-login:systemd:' configure || die #501306
+}
+
+src_configure() {
+ use elibc_musl && append-cppflags -D_XOPEN_SOURCE_EXTENDED
+ econf \
+ --exec-prefix="${EPREFIX}" \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ --disable-watch8bit \
+ $(use_enable modern-top) \
+ $(use_with ncurses) \
+ $(use_enable nls) \
+ $(use_enable selinux libselinux) \
+ $(use_enable static-libs static) \
+ $(use_with systemd)
+}
+
+src_install() {
+ default
+ #dodoc sysctl.conf
+
+ mv "${ED}"/usr/bin/pidof "${ED}"/bin/ || die
+
+ # The configure script is completely whacked in the head
+ mv "${ED}"/lib* "${ED}"/usr/ || die
+ gen_usr_ldscript -a procps
+ prune_libtool_files
+}
diff --git a/sys-process/procps/procps-3.3.8-r99.ebuild b/sys-process/procps/procps-3.3.8-r99.ebuild
new file mode 100644
index 0000000..1ed3ba5
--- /dev/null
+++ b/sys-process/procps/procps-3.3.8-r99.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/procps-3.3.8-r1.ebuild,v 1.10 2013/12/26 14:41:10 maekke Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="standard informational utilities and process-handling tools"
+# http://packages.debian.org/sid/procps
+HOMEPAGE="http://procps.sourceforge.net/ http://gitorious.org/procps"
+# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz"
+FEDORA_HASH="aecbeeda2ab308f8d09dddcb4cb9a572"
+SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz
+ https://gitorious.org/${PN}/${PN}/commit/ce5e995921e770bfcda25e42fe090aeccdbf1291.patch -> ${P}-respect_epipe_in_fileutils.patch"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="+ncurses nls static-libs unicode"
+
+RDEPEND="ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] )"
+DEPEND="${RDEPEND}
+ ncurses? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )"
+
+S=${WORKDIR}/${PN}-ng-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-kill-neg-pid.patch \
+ "${DISTDIR}"/${P}-respect_epipe_in_fileutils.patch \
+ "${FILESDIR}"/${P}-no-error_h.patch \
+ "${FILESDIR}"/${P}-no-GLOB_TILDE.patch
+}
+
+src_configure() {
+ use elibc_musl && export ac_cv_search_dlopen=
+ use elibc_musl && append-cflags -D_XOPEN_SOURCE_EXTENDED
+ econf \
+ --exec-prefix="${EPREFIX}" \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ $(use_with ncurses) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_enable unicode watch8bit)
+}
+
+src_install() {
+ default
+# dodoc sysctl.conf
+
+ # The configure script is completely whacked in the head
+ mv "${ED}"/lib* "${ED}"/usr/ || die
+ gen_usr_ldscript -a procps
+ prune_libtool_files
+}
diff --git a/sys-process/procps/procps-3.3.9-r99.ebuild b/sys-process/procps/procps-3.3.9-r99.ebuild
new file mode 100644
index 0000000..41b08e2
--- /dev/null
+++ b/sys-process/procps/procps-3.3.9-r99.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/procps/procps-3.3.9.ebuild,v 1.6 2014/05/14 18:16:01 ssuominen Exp $
+
+EAPI="4"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="standard informational utilities and process-handling tools"
+# http://packages.debian.org/sid/procps
+HOMEPAGE="http://procps.sourceforge.net/ http://gitorious.org/procps"
+# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz"
+FEDORA_HASH="0980646fa25e0be58f7afb6b98f79d74"
+SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="+ncurses nls static-libs test unicode"
+
+RDEPEND="ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] )
+ !<sys-apps/sysvinit-2.88-r6"
+DEPEND="${RDEPEND}
+ ncurses? ( virtual/pkgconfig )
+ test? ( dev-util/dejagnu )"
+
+S=${WORKDIR}/${PN}-ng-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch
+ epatch "${FILESDIR}"/${PN}-3.3.8-no-GLOB_TILDE.patch
+ epatch "${FILESDIR}"/${P}-no-error_h.patch
+ epatch "${FILESDIR}"/${P}-configure.patch
+ autoreconf
+}
+
+src_configure() {
+ use elibc_musl && append-cppflags -D_XOPEN_SOURCE_EXTENDED
+ econf \
+ --exec-prefix="${EPREFIX}" \
+ --docdir='$(datarootdir)'/doc/${PF} \
+ $(use_with ncurses) \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_enable unicode watch8bit)
+}
+
+src_install() {
+ default
+# dodoc sysctl.conf
+
+ # The configure script is completely whacked in the head
+ mv "${ED}"/lib* "${ED}"/usr/ || die
+ gen_usr_ldscript -a procps
+ prune_libtool_files
+}
diff --git a/sys-process/psmisc/Manifest b/sys-process/psmisc/Manifest
new file mode 100644
index 0000000..6c03e80
--- /dev/null
+++ b/sys-process/psmisc/Manifest
@@ -0,0 +1,4 @@
+AUX psmisc-22.21-add-limits_h.patch 355 SHA256 363ba4dcc2627d7db260f29a97888fe8b58315fa5317bf3506e685c9fc30e46e SHA512 a26cd96decdbcb7ed8822a5cee74254b428a0ff8b76c972b08be80a345f29bfb915ccd7b3816d1ca0c559ddc7b1a945f49091142abef74e508d57ba487b39c49 WHIRLPOOL 3fc7e0172f709158a19e7f6679d1918f8abd4a085be99537634beff5075eb7527cf9dbf20ed960047b7506ce7800808560245cb76ae87cda27b01d70d0aa14bd
+DIST psmisc-22.21.tar.gz 457702 SHA256 97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a SHA512 766aeb45687090b88b17176c5117a603e83fe92a13c013aea72c8ee80048adf02e18c7daa52ddfb8b2135f7c9a1bcae38896cdfb8d0158728d85a446c5e0d5ae WHIRLPOOL cbd4af3e54ce01f43558184b57a24e44dfb6e05d8438bd11e2308ee62535bb93dc417b08e66603966cc5912d7fa88c29df1529995a42e2a8b7c3da663b01681f
+EBUILD psmisc-22.21-r99.ebuild 1343 SHA256 82d077e6930d8d2eff5bb2ef780c46b87cb7c47cc903aa793a1e8f5893fc33ee SHA512 2dc58ef39345a28438df9b76656daa9a2d53168362b115f97861863b9cf078174d5c747a3d421bf81a6345a1e54c719a21a47e1eb0d65419038e588c79702869 WHIRLPOOL 4ee6d1c533ca54b4582a10b7e5937fb08306c209d8df729a71b4d71dccca359fdbfc155861660bc1fe02179181336a91d652be599e957a5882c3afe2acf1b684
+MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
diff --git a/sys-process/psmisc/files/psmisc-22.21-add-limits_h.patch b/sys-process/psmisc/files/psmisc-22.21-add-limits_h.patch
new file mode 100644
index 0000000..6ebb34a
--- /dev/null
+++ b/sys-process/psmisc/files/psmisc-22.21-add-limits_h.patch
@@ -0,0 +1,11 @@
+diff -Naur psmisc-22.21.orig/src/pstree.c psmisc-22.21/src/pstree.c
+--- psmisc-22.21.orig/src/pstree.c 2013-09-29 05:11:56.000000000 +0000
++++ psmisc-22.21/src/pstree.c 2014-03-26 13:30:36.000000000 +0000
+@@ -41,6 +41,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
++#include <limits.h>
+
+ #include "i18n.h"
+ #include "comm.h"
diff --git a/sys-process/psmisc/metadata.xml b/sys-process/psmisc/metadata.xml
new file mode 100644
index 0000000..96a2d58
--- /dev/null
+++ b/sys-process/psmisc/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
diff --git a/sys-process/psmisc/psmisc-22.21-r99.ebuild b/sys-process/psmisc/psmisc-22.21-r99.ebuild
new file mode 100644
index 0000000..f2b097d
--- /dev/null
+++ b/sys-process/psmisc/psmisc-22.21-r99.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/psmisc/psmisc-22.21.ebuild,v 1.2 2014/01/18 03:51:41 vapier Exp $
+
+EAPI="4"
+
+inherit eutils
+
+DESCRIPTION="A set of tools that use the proc filesystem"
+HOMEPAGE="http://psmisc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~mips ppc x86"
+IUSE="ipv6 nls selinux X"
+
+RDEPEND=">=sys-libs/ncurses-5.7-r7
+ nls? ( virtual/libintl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ >=sys-devel/libtool-2.2.6b
+ nls? ( sys-devel/gettext )"
+
+DOCS="AUTHORS ChangeLog NEWS README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-add-limits_h.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable selinux) \
+ --disable-harden-flags \
+ $(use_enable ipv6) \
+ $(use_enable nls)
+}
+
+src_compile() {
+ # peekfd is a fragile crap hack #330631
+ nonfatal emake -C src peekfd || touch src/peekfd{.o,}
+ emake
+}
+
+src_install() {
+ default
+
+ use X || rm -f "${ED}"/usr/bin/pstree.x11
+
+ [[ -s ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/bin/peekfd
+ [[ -e ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/share/man/man1/peekfd.1
+
+ # fuser is needed by init.d scripts; use * wildcard for #458250
+ dodir /bin
+ mv "${ED}"/usr/bin/*fuser "${ED}"/bin || die
+}