d3e3ac0f62341742bae908d704e058a7038843b5
[gentoo.git] / sys-process / procps / procps-3.3.15-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
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/6" # 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         !<sys-apps/sysvinit-2.88-r6
36 "
37
38 S="${WORKDIR}/${PN}-ng-${PV}"
39
40 PATCHES=(
41         "${FILESDIR}"/${PN}-3.3.11-sysctl-manpage.patch # 565304
42         "${FILESDIR}"/${PN}-3.3.12-proc-tests.patch # 583036
43
44         # Upstream fixes
45 )
46
47 src_configure() {
48         # http://www.freelists.org/post/procps/PATCH-enable-transparent-large-file-support
49         append-lfs-flags #471102
50         local myeconfargs=(
51                 --docdir='$(datarootdir)'/doc/${PF}
52                 $(use_with elogind)
53                 $(use_enable kill)
54                 $(use_enable modern-top)
55                 $(use_with ncurses)
56                 $(use_enable nls)
57                 $(use_enable selinux libselinux)
58                 $(use_enable static-libs static)
59                 $(use_with systemd)
60                 $(use_enable unicode watch8bit)
61         )
62         econf "${myeconfargs[@]}"
63 }
64
65 src_test() {
66         emake check </dev/null #461302
67 }
68
69 src_install() {
70         default
71         #dodoc sysctl.conf
72
73         dodir /bin
74         mv "${ED%/}"/usr/bin/ps "${ED%/}"/bin/ || die
75         if use kill; then
76                 mv "${ED%/}"/usr/bin/kill "${ED}"/bin/ || die
77         fi
78
79         gen_usr_ldscript -a procps
80         find "${D}" -name '*.la' -delete || die
81 }