diff options
Diffstat (limited to 'sys-process/lsof')
-rw-r--r-- | sys-process/lsof/Manifest | 5 | ||||
-rw-r--r-- | sys-process/lsof/files/lsof-4.90-darwin-cppfix.patch | 12 | ||||
-rw-r--r-- | sys-process/lsof/lsof-4.90.ebuild | 12 | ||||
-rw-r--r-- | sys-process/lsof/lsof-4.91.ebuild | 119 |
4 files changed, 146 insertions, 2 deletions
diff --git a/sys-process/lsof/Manifest b/sys-process/lsof/Manifest index 90c3e4c4e097..11fbd88c602c 100644 --- a/sys-process/lsof/Manifest +++ b/sys-process/lsof/Manifest @@ -1,7 +1,10 @@ AUX lsof-4.85-cross.patch 1061 BLAKE2B 730a02dfcd433bb6d46d3fecd87aa0913800408d67302bd9a9580ab3fec6e4a88e453890dec348796258eccd4c5185cc8f06ab2029347d632037f24dd0aa066e SHA512 9326a2708910a39ba3b81253c21149f8e4fa44b207e4c2a88f86c9322d2b50e6360760fcb13e00f644aba57ad207106c280db00ebc2d1f3d49405b54681548e8 +AUX lsof-4.90-darwin-cppfix.patch 408 BLAKE2B 761ad2ee39ff4c7080466b20322b58624fb71b606a5e12e818915f3a3621a61474bc041c05f2f58274334c4254896d8ee4aa4fa73ff5c0347d5d8070e8a3549e SHA512 1813f1a7440576872416b1ae1f10015a26828c5c6029e252cb90fe791ebc6f718b0fa2a53e9ebf71d784ff7e748e0f0217972918ea1cd702a5614331b4f61900 DIST lsof_4.89.tar.bz2 784560 BLAKE2B 375ad53fd5c26a79559295fc8bcb6c495c00bf546019001b498f064dbd111f3581d60a577c199ce2cbd49dac0c061cdaea99de56d6bf069dceb0dd8b2f836942 SHA512 cafb0209143c7863e5cebe7efc33a2520d36f9e26222350e4edfa18debbcfb5c81f42f71469e5913fb21f49a7562bbe761b72dfc8f297dadf75ac619cdcb318c DIST lsof_4.90.tar.bz2 791758 BLAKE2B 250025eb553ee4574cadadcc57fa52bd97d8ce4432e25e9e028d3eec4033be54d5cbab5f02e0a04365033b5d179ca50efa591efe4ac28077f63513edee131084 SHA512 8c1481ab72867488d800ad68c9de5c936f034f044c90eeed220fb5683f68ba8efa3dd0efe1e23b4d4968750255b475150ad08ae8627dd9aa0a5025498418351a +DIST lsof_4.91.tar.bz2 791734 BLAKE2B cd6211caedea34fdbb89266fd78a70902117eda6d4d7fa69115426f4a6f5cb5296fa09bbd946648d8d93483881e4ea4e2190f090be155c1081850e8366cfd05a SHA512 49f811941dd6303f7cb0655fddb8b1177af5d1b18f2bd1edfab09d2c128aea73daecf09c7a5375979c66ba764c88a6e70c9086b55c3634e3be01ab1aa12e9f92 EBUILD lsof-4.89-r1.ebuild 3252 BLAKE2B c06ea5f26ef03bc3ddd1712afb89a9bf5c7b37ee9fb553b6db65a50bc3cbf448c2f4be18a9c8453b09ff0e5d5b317e08506d7799b21000bb37d5df942efbb795 SHA512 f44b786019ecf0cf041f51725a8a5ee742b01723638ed215b60988b48a98c164aaee7beb4dcd906f836d383630edc6fe805910082f9782adf6734b2ee16e58e5 EBUILD lsof-4.89.ebuild 2980 BLAKE2B 2d2229df4d2d952bffff94f3fe0066107e3a1ed93d410a043c6ac57221f3a4a65a5f1e63cc7614c8b34cb93a3bea6668938663d30c3ca8f10fee3a59e2af370c SHA512 3b3d5ce06f3123aca989c683d8c3ef165eafc488258e87e429c96159f5c402326cbfee8426594b89b3106c36d7c2c80e3a501c4d2f4dddd6c8fb2687017772b1 -EBUILD lsof-4.90.ebuild 3262 BLAKE2B d9d84cd4d4ad411fdebce92deb5fbee37d7ead230982fd5288670ba89d6679dac553870d5a83993cf2d48d742c6dec922f51192c8c433d92652e2757984b039b SHA512 ce0bc6ec9576656ab3bb6d79a45bb520bb054a62bc22236edeaa768bd32171e89387253822b283644a55d4a8c0d233a82efd797c1a780af0ecc0ea703b45fc0b +EBUILD lsof-4.90.ebuild 3665 BLAKE2B f5450b27154595a2d30e07ed804c18f281d2f7a563a550fdb5437099cce5e1f45406da063c97fceca04e38f0f73eb99afbd01228aeaceec8631bc8b093363e74 SHA512 f652c0eaffc1dc51b298f68e1935621d9063d1709ec6154b63e560f3f39c16407efb3dac647c216b9552a02de3559ba115222252e01da4c4ee0cde02912c0dda +EBUILD lsof-4.91.ebuild 3665 BLAKE2B f5450b27154595a2d30e07ed804c18f281d2f7a563a550fdb5437099cce5e1f45406da063c97fceca04e38f0f73eb99afbd01228aeaceec8631bc8b093363e74 SHA512 f652c0eaffc1dc51b298f68e1935621d9063d1709ec6154b63e560f3f39c16407efb3dac647c216b9552a02de3559ba115222252e01da4c4ee0cde02912c0dda MISC metadata.xml 327 BLAKE2B 4dec6763546c6f65ccd6a2483e6cc99203313a267ee5f18ca0e646f9af8774c8760e4f56711735f2c64880af8bc78e26b22e47774b36fb48ccd2d841647d274e SHA512 c8c0efc3b339063936d805d533cf3528e1a4e1a84829c0e0f993fd3268751f4d7d4713f45cc6fec2956101b611e6e344e0c0336eb8d1b769a47481d72088fb98 diff --git a/sys-process/lsof/files/lsof-4.90-darwin-cppfix.patch b/sys-process/lsof/files/lsof-4.90-darwin-cppfix.patch new file mode 100644 index 000000000000..fcbfeba410af --- /dev/null +++ b/sys-process/lsof/files/lsof-4.90-darwin-cppfix.patch @@ -0,0 +1,12 @@ +diff -Naur a/dialects/darwin/libproc/dfile.c b/dialects/darwin/libproc/dfile.c +--- a/dialects/darwin/libproc/dfile.c 2018-02-19 15:04:26.011578124 +0800 ++++ b/dialects/darwin/libproc/dfile.c 2018-02-19 15:04:45.006502653 +0800 +@@ -43,7 +43,7 @@ + #include "lsof.h" + + #if defined(PROC_FP_GUARDED) +-#extern struct pff_tab Pgf_tab[]; ++extern struct pff_tab Pgf_tab[]; + #endif /* defined(PROC_FP_GUARDED) */ + + diff --git a/sys-process/lsof/lsof-4.90.ebuild b/sys-process/lsof/lsof-4.90.ebuild index f22dd0eaae84..8a1faa697af2 100644 --- a/sys-process/lsof/lsof-4.90.ebuild +++ b/sys-process/lsof/lsof-4.90.ebuild @@ -14,7 +14,7 @@ SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${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 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +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 ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" IUSE="examples ipv6 rpc selinux static" RDEPEND="rpc? ( net-libs/libtirpc ) @@ -26,6 +26,7 @@ S="${WORKDIR}/${MY_P}/${MY_P}_src" PATCHES=( "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + "${FILESDIR}"/${PN}-4.90-darwin-cppfix.patch #648084 ) src_unpack() { @@ -66,6 +67,15 @@ src_configure() { append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") append-cppflags $(usex ipv6 -{D,U}HASIPv6) [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX + if [[ ${CHOST} == *-darwin* ]] ; then + # make sys/proc_info.h available in ${T} because of LSOF_INCLUDE + # dummy location -- Darwin needs this for a Configure check to + # succeed + if [[ -e /usr/include/sys/proc_info.h ]] ; then + mkdir -p "${T}"/sys || die + ( cd "${T}"/sys && ln -s /usr/include/sys/proc_info.h ) || die + fi + fi export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" diff --git a/sys-process/lsof/lsof-4.91.ebuild b/sys-process/lsof/lsof-4.91.ebuild new file mode 100644 index 000000000000..8a1faa697af2 --- /dev/null +++ b/sys-process/lsof/lsof-4.91.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit 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 + http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/${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 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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" + +PATCHES=( + "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + "${FILESDIR}"/${PN}-4.90-darwin-cppfix.patch #648084 +) + +src_unpack() { + unpack ${A} + cd ${MY_P} || die + unpack ./${MY_P}_src.tar +} + +src_prepare() { + default + # fix POSIX compliance with `echo` + sed -i \ + -e 's:echo -n:printf:' \ + AFSConfig Configure Customize Inventory tests/CkTestDB || die + # Convert `test -r header.h` into a compile test. + # Make sure we convert `test ... -a ...` into two `test` commands + # so we can then convert both over into a compile test. #601432 + sed -i -E \ + -e '/if test .* -a /s: -a : \&\& test :g' \ + -e '/test -r/s:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:g' \ + -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) + [[ ${CHOST} == *-solaris2.11 ]] && append-cppflags -DHAS_PAD_MUTEX + if [[ ${CHOST} == *-darwin* ]] ; then + # make sys/proc_info.h available in ${T} because of LSOF_INCLUDE + # dummy location -- Darwin needs this for a Configure check to + # succeed + if [[ -e /usr/include/sys/proc_info.h ]] ; then + mkdir -p "${T}"/sys || die + ( cd "${T}"/sys && ln -s /usr/include/sys/proc_info.h ) || die + fi + fi + + 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 +} |