From bb5d537d298219daadf0c6d9cc5c25981cc21325 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 15 Jan 2024 07:16:08 +0000 Subject: [PATCH] sys-process/lsof: Sync with Gentoo It's from Gentoo commit 4f3686c867b7c7220237cca087d4be88e54d872b. --- ...lsof-4.98.0-fix-clang-version-parser.patch | 15 ++++++++++++++ .../sys-process/lsof/lsof-4.98.0-r1.ebuild | 12 +++++++++-- .../sys-process/lsof/lsof-4.99.0.ebuild | 20 ++++++++++++++++++- .../sys-process/lsof/lsof-4.99.3.ebuild | 20 ++++++++++++++++++- 4 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.98.0-fix-clang-version-parser.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.98.0-fix-clang-version-parser.patch b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.98.0-fix-clang-version-parser.patch new file mode 100644 index 0000000000..ebb5d85d2e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/files/lsof-4.98.0-fix-clang-version-parser.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/919253 +https://github.com/lsof-org/lsof/issues/305 + +Ignore HIP or CUDA versions in clang, when checking for compiler version +--- a/configure.ac ++++ b/configure.ac +@@ -410,7 +410,7 @@ AC_CONFIG_FILES([Makefile]) + + # Pass build configurations to version.h.in + AC_SUBST(cc, $CC) +-AC_SUBST(ccv, $($CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p')) ++AC_SUBST(ccv, $($CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p;q')) + AC_SUBST(ccflags, $CFLAGS) + AC_SUBST(ldflags, "$LDFLAGS$LIBS") + # Reproducible build diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.98.0-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.98.0-r1.ebuild index 77f81e7410..8505f4c5cb 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.98.0-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.98.0-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -inherit flag-o-matic +inherit autotools flag-o-matic MY_P="${P/-/_}" DESCRIPTION="Lists open files for running Unix processes" @@ -30,8 +30,16 @@ RESTRICT="test" PATCHES=( "${FILESDIR}"/${P}-fix-common-include-strftime.patch + "${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch ) +# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3 +# https://github.com/lsof-org/lsof/pull/306 +src_prepare() { + default + eautoreconf +} + src_configure() { # TODO: drop after 4.98.0: https://github.com/lsof-org/lsof/commit/4fbe0b78f63ce115f25cf7a49756745e3bf47fea export ac_cv_header_selinux_selinux_h=$(usex selinux) diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.0.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.0.ebuild index c94a98abca..5a38a82c40 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.0.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit autotools + MY_P="${P/-/_}" DESCRIPTION="Lists open files for running Unix processes" HOMEPAGE="https://github.com/lsof-org/lsof" @@ -26,6 +28,17 @@ BDEPEND=" # Needs fixing first for sandbox RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch +) + +# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3 +# https://github.com/lsof-org/lsof/pull/306 +src_prepare() { + default + eautoreconf +} + src_configure() { local myeconfargs=( $(use_with rpc libtirpc) @@ -39,6 +52,11 @@ src_compile() { emake DEBUG="" all } +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} + pkg_postinst() { if [[ ${CHOST} == *-solaris* ]] ; then einfo "Note: to use lsof on Solaris you need read permissions on" diff --git a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.3.ebuild b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.3.ebuild index 9965531bc3..89ddf51e8c 100644 --- a/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.3.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-process/lsof/lsof-4.99.3.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 +inherit autotools + MY_P="${P/-/_}" DESCRIPTION="Lists open files for running Unix processes" HOMEPAGE="https://github.com/lsof-org/lsof" @@ -26,6 +28,17 @@ BDEPEND=" # Needs fixing first for sandbox RESTRICT="test" +PATCHES=( + "${FILESDIR}"/${PN}-4.98.0-fix-clang-version-parser.patch +) + +# TODO: drop this block, "inherit autotools" and clang-version-parser patch after 4.99.3 +# https://github.com/lsof-org/lsof/pull/306 +src_prepare() { + default + eautoreconf +} + src_configure() { local myeconfargs=( $(use_with rpc libtirpc) @@ -39,6 +52,11 @@ src_compile() { emake DEBUG="" all } +src_install() { + default + find "${ED}" -name '*.la' -delete || die +} + pkg_postinst() { if [[ ${CHOST} == *-solaris* ]] ; then einfo "Note: to use lsof on Solaris you need read permissions on"