520b8f0d9507d45419bab4c73953ebffddd94e06
[gentoo.git] / sys-process / procps / procps-3.3.16.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs flag-o-matic usr-ldscript
7
8 DESCRIPTION="standard informational utilities and process-handling tools"
9 HOMEPAGE="http://procps-ng.sourceforge.net/ https://gitlab.com/procps-ng/procps"
10 SRC_URI="mirror://sourceforge/${PN}-ng/${PN}-ng-${PV}.tar.xz"
11
12 LICENSE="GPL-2"
13 SLOT="0/8" # libprocps.so
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux"
15 IUSE="elogind +kill modern-top +ncurses nls selinux static-libs systemd test unicode"
16 RESTRICT="!test? ( test )"
17
18 COMMON_DEPEND="
19         elogind? ( sys-auth/elogind )
20         ncurses? ( >=sys-libs/ncurses-5.7-r7:=[unicode?] )
21         selinux? ( sys-libs/libselinux )
22         systemd? ( sys-apps/systemd )
23 "
24 DEPEND="${COMMON_DEPEND}
25         elogind? ( virtual/pkgconfig )
26         ncurses? ( virtual/pkgconfig )
27         systemd? ( virtual/pkgconfig )
28         test? ( dev-util/dejagnu )"
29 RDEPEND="
30         ${COMMON_DEPEND}
31         kill? (
32                 !sys-apps/coreutils[kill]
33                 !sys-apps/util-linux[kill]
34         )
35         !<app-i18n/man-pages-de-2.12-r1
36         !<app-i18n/man-pages-pl-0.7-r1
37         !<sys-apps/sysvinit-2.88-r6
38 "
39
40 S="${WORKDIR}/${PN}-ng-${PV}"
41
42 PATCHES=(
43         "${FILESDIR}"/${PN}-3.3.11-sysctl-manpage.patch # 565304
44         "${FILESDIR}"/${PN}-3.3.12-proc-tests.patch # 583036
45
46         # Upstream fixes
47 )
48
49 src_configure() {
50         # http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support
51         append-lfs-flags #471102
52         local myeconfargs=(
53                 $(use_with elogind)
54                 $(use_enable kill)
55                 $(use_enable modern-top)
56                 $(use_with ncurses)
57                 $(use_enable nls)
58                 $(use_enable selinux libselinux)
59                 $(use_enable static-libs static)
60                 $(use_with systemd)
61                 $(use_enable unicode watch8bit)
62         )
63         econf "${myeconfargs[@]}"
64 }
65
66 src_test() {
67         emake check </dev/null #461302
68 }
69
70 src_install() {
71         default
72         #dodoc sysctl.conf
73
74         dodir /bin
75         mv "${ED}"/usr/bin/ps "${ED}"/bin/ || die
76         if use kill; then
77                 mv "${ED}"/usr/bin/kill "${ED}"/bin/ || die
78         fi
79
80         gen_usr_ldscript -a procps
81         find "${ED}" -type f -name '*.la' -delete || die
82 }