From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A5ACD158020 for ; Sat, 12 Nov 2022 03:15:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A37EAE09E6; Sat, 12 Nov 2022 03:15:00 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 86F74E09E6 for ; Sat, 12 Nov 2022 03:15:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9723333BDF5 for ; Sat, 12 Nov 2022 03:14:59 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D7D78710 for ; Sat, 12 Nov 2022 03:14:57 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1668222886.f6372379f6e6591c96b94eda31f808e7d5922905.mattst88@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/lsof/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/lsof/Manifest sys-process/lsof/lsof-4.96.4.ebuild X-VCS-Directories: sys-process/lsof/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: f6372379f6e6591c96b94eda31f808e7d5922905 X-VCS-Branch: master Date: Sat, 12 Nov 2022 03:14:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 00f6d81a-a3a8-4a6a-bb91-1c0734a94d1b X-Archives-Hash: e3579a2d37033af9e592f9ab51b3f24e commit: f6372379f6e6591c96b94eda31f808e7d5922905 Author: Matt Turner gentoo org> AuthorDate: Sat Nov 12 02:46:29 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Sat Nov 12 03:14:46 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6372379 sys-process/lsof: Version bump to 4.96.4 Drop IUSE=ipv6 for the obvious reasons, but also it was broken. The Configure script detects IPv6 support and appends -DHASIPv6 *after* our append-cppflags setting, so IPv6 support was always enabled. Signed-off-by: Matt Turner gentoo.org> sys-process/lsof/Manifest | 1 + sys-process/lsof/lsof-4.96.4.ebuild | 116 ++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/sys-process/lsof/Manifest b/sys-process/lsof/Manifest index 96aefc575279..fbab9a3c28dc 100644 --- a/sys-process/lsof/Manifest +++ b/sys-process/lsof/Manifest @@ -1,2 +1,3 @@ DIST lsof-4.95.0.tar.gz 1343380 BLAKE2B ffb0a656463f8f0e84ddcba36d78a94a8b4b883f0ff043c3821b3236274fb11e04b8c82f84f4e67ab922f021769c2711c1e97716aef3190d640fc321110521a3 SHA512 09c5c4b0ea0530e23b98b96df8485f37c2594028b604097a816aee216a8b1a7bc887071e8727cbaf3c765d0992314a5aa49723572cfe926f88806be18a6b8aef DIST lsof-4.96.3.tar.gz 1342843 BLAKE2B 79e276d0db5138c356cc8bfa32e6f991ce8860644eb5d02f49ba04ce08076232f0fb8b10e143ee135205de5c64bd053d7bf021e48d666b65ffc01c0a47b76116 SHA512 ad17a73590ffb154a13b8b5de8ada738ce343fcc833012b2a5e9b3bda587785b09ae8bf090a99fba8e84b788c2a6d61eaa7359f939bfa68d2423e604801e2a98 +DIST lsof-4.96.4.tar.gz 1342514 BLAKE2B c420e2f928ffa8148a62298ba7176f860b15f9e78f4c2dc299162614a1d9b94a85c42ee93ef5e92b8a99f1c67e496cf2c848874b844c22c287aab53bfe211c58 SHA512 06f8005e1eb72324c1fd603d8b8287a61ad6fdec182e9da833991a8915aaa69c416af1564d3b1087cb08b3504ef9b15cdffec7051605e89d945d6750ec8da985 diff --git a/sys-process/lsof/lsof-4.96.4.ebuild b/sys-process/lsof/lsof-4.96.4.ebuild new file mode 100644 index 000000000000..8469241372c2 --- /dev/null +++ b/sys-process/lsof/lsof-4.96.4.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +MY_P="${P/-/_}" +DESCRIPTION="Lists open files for running Unix processes" +HOMEPAGE="https://github.com/lsof-org/lsof" +SRC_URI="https://github.com/lsof-org/lsof/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples rpc selinux" + +RDEPEND="rpc? ( net-libs/libtirpc ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND}" +BDEPEND="sys-apps/groff + rpc? ( virtual/pkgconfig )" + +# Needs fixing first +RESTRICT="test" + +PATCHES=( + "${FILESDIR}"/${PN}-4.85-cross.patch # bug #432120 +) + +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 + + # "create" man-page (bug #689462) + # inspired by shipped "makeman" ksh script + soelim < Lsof.8 > lsof.8 || die +} + +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + +src_configure() { + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") + + [[ ${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 +}