Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/lsof/
Date: Tue, 27 Mar 2018 08:08:37
Message-Id: 1522138109.71bcf074ebf88f393090ca31712852dfa2887e78.polynomial-c@gentoo
1 commit: 71bcf074ebf88f393090ca31712852dfa2887e78
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 27 08:02:08 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 27 08:08:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71bcf074
7
8 sys-process/lsof: Bump to version 4.91
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 sys-process/lsof/Manifest | 1 +
13 sys-process/lsof/lsof-4.91.ebuild | 109 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 110 insertions(+)
15
16 diff --git a/sys-process/lsof/Manifest b/sys-process/lsof/Manifest
17 index b44111bb28c..d7c71215ef9 100644
18 --- a/sys-process/lsof/Manifest
19 +++ b/sys-process/lsof/Manifest
20 @@ -1,2 +1,3 @@
21 DIST lsof_4.89.tar.bz2 784560 BLAKE2B 375ad53fd5c26a79559295fc8bcb6c495c00bf546019001b498f064dbd111f3581d60a577c199ce2cbd49dac0c061cdaea99de56d6bf069dceb0dd8b2f836942 SHA512 cafb0209143c7863e5cebe7efc33a2520d36f9e26222350e4edfa18debbcfb5c81f42f71469e5913fb21f49a7562bbe761b72dfc8f297dadf75ac619cdcb318c
22 DIST lsof_4.90.tar.bz2 791758 BLAKE2B 250025eb553ee4574cadadcc57fa52bd97d8ce4432e25e9e028d3eec4033be54d5cbab5f02e0a04365033b5d179ca50efa591efe4ac28077f63513edee131084 SHA512 8c1481ab72867488d800ad68c9de5c936f034f044c90eeed220fb5683f68ba8efa3dd0efe1e23b4d4968750255b475150ad08ae8627dd9aa0a5025498418351a
23 +DIST lsof_4.91.tar.bz2 791734 BLAKE2B cd6211caedea34fdbb89266fd78a70902117eda6d4d7fa69115426f4a6f5cb5296fa09bbd946648d8d93483881e4ea4e2190f090be155c1081850e8366cfd05a SHA512 49f811941dd6303f7cb0655fddb8b1177af5d1b18f2bd1edfab09d2c128aea73daecf09c7a5375979c66ba764c88a6e70c9086b55c3634e3be01ab1aa12e9f92
24
25 diff --git a/sys-process/lsof/lsof-4.91.ebuild b/sys-process/lsof/lsof-4.91.ebuild
26 new file mode 100644
27 index 00000000000..f22dd0eaae8
28 --- /dev/null
29 +++ b/sys-process/lsof/lsof-4.91.ebuild
30 @@ -0,0 +1,109 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit flag-o-matic toolchain-funcs
37 +
38 +MY_P="${P/-/_}"
39 +DESCRIPTION="Lists open files for running Unix processes"
40 +HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/"
41 +SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2
42 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2
43 + http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2"
44 +
45 +LICENSE="lsof"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
48 +IUSE="examples ipv6 rpc selinux static"
49 +
50 +RDEPEND="rpc? ( net-libs/libtirpc )
51 + selinux? ( sys-libs/libselinux )"
52 +DEPEND="${RDEPEND}
53 + rpc? ( virtual/pkgconfig )"
54 +
55 +S="${WORKDIR}/${MY_P}/${MY_P}_src"
56 +
57 +PATCHES=(
58 + "${FILESDIR}"/${PN}-4.85-cross.patch #432120
59 +)
60 +
61 +src_unpack() {
62 + unpack ${A}
63 + cd ${MY_P} || die
64 + unpack ./${MY_P}_src.tar
65 +}
66 +
67 +src_prepare() {
68 + default
69 + # fix POSIX compliance with `echo`
70 + sed -i \
71 + -e 's:echo -n:printf:' \
72 + AFSConfig Configure Customize Inventory tests/CkTestDB || die
73 + # Convert `test -r header.h` into a compile test.
74 + # Make sure we convert `test ... -a ...` into two `test` commands
75 + # so we can then convert both over into a compile test. #601432
76 + sed -i -E \
77 + -e '/if test .* -a /s: -a : \&\& test :g' \
78 + -e '/test -r/s:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:g' \
79 + -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \
80 + Configure || die
81 +}
82 +
83 +target() {
84 + case ${CHOST} in
85 + *-darwin*) echo darwin ;;
86 + *-freebsd*) echo freebsd ;;
87 + *-solaris*) echo solaris ;;
88 + *-aix*) echo aixgcc ;;
89 + *) echo linux ;;
90 + esac
91 +}
92 +
93 +src_configure() {
94 + use static && append-ldflags -static
95 +
96 + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H")
97 + append-cppflags $(usex ipv6 -{D,U}HASIPv6)
98 + [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX
99 +
100 + export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \
101 + $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)"
102 +
103 + # Set LSOF_INCLUDE to a dummy location so the script doesn't poke
104 + # around in it and mix /usr/include paths with cross-compile/etc.
105 + touch .neverInv
106 + LINUX_HASSELINUX=$(usex selinux y n) \
107 + LSOF_INCLUDE=${T} \
108 + LSOF_CC=$(tc-getCC) \
109 + LSOF_AR="$(tc-getAR) rc" \
110 + LSOF_RANLIB=$(tc-getRANLIB) \
111 + LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \
112 + ./Configure -n $(target) || die
113 +}
114 +
115 +src_compile() {
116 + emake DEBUG="" all
117 +}
118 +
119 +src_install() {
120 + dobin lsof
121 +
122 + if use examples ; then
123 + insinto /usr/share/lsof/scripts
124 + doins scripts/*
125 + fi
126 +
127 + doman lsof.8
128 + dodoc 00*
129 +}
130 +
131 +pkg_postinst() {
132 + if [[ ${CHOST} == *-solaris* ]] ; then
133 + einfo "Note: to use lsof on Solaris you need read permissions on"
134 + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys"
135 + elif [[ ${CHOST} == *-aix* ]] ; then
136 + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and"
137 + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system"
138 + fi
139 +}