commit: 7ee4caa35081a4ccaa530b79dfbf6c1b835a96d0 Author: NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com> AuthorDate: Wed Feb 26 17:17:01 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Mar 10 01:39:48 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ee4caa3
dev-libs/libspt: update EAPI 7 -> 8, fix gettimeofday usage Closes: https://bugs.gentoo.org/943014 Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/40776 Signed-off-by: Sam James <sam <AT> gentoo.org> .../libspt/files/libspt-1.1-timeval-in-utmp.patch | 17 ++++++++ dev-libs/libspt/libspt-1.1-r5.ebuild | 51 ++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/dev-libs/libspt/files/libspt-1.1-timeval-in-utmp.patch b/dev-libs/libspt/files/libspt-1.1-timeval-in-utmp.patch new file mode 100644 index 000000000000..ad27b9161f1d --- /dev/null +++ b/dev-libs/libspt/files/libspt-1.1-timeval-in-utmp.patch @@ -0,0 +1,17 @@ +Switch to canonic handling of timeval possibly embedded in +struct utmp, see manpage. +https://bugs.gentoo.org/943014 +--- a/sptagent.c ++++ b/sptagent.c +@@ -1033,7 +1033,10 @@ + { + #ifdef HAVE_UTMP_UT_TV + #ifdef HAVE_GETTIMEOFDAY +- gettimeofday(&utptr->ut_tv, NULL); ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ utptr->ut_tv.tv_sec = tv.tv_sec; ++ utptr->ut_tv.tv_usec = tv.tv_usec; + #else + utptr->ut_tv.tv_sec = time(NULL); + utptr->ut_tv.ut_usec = 0; diff --git a/dev-libs/libspt/libspt-1.1-r5.ebuild b/dev-libs/libspt/libspt-1.1-r5.ebuild new file mode 100644 index 000000000000..7d9528b5db21 --- /dev/null +++ b/dev-libs/libspt/libspt-1.1-r5.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Library for handling root privilege" +HOMEPAGE="http://www.j10n.org/libspt/" +SRC_URI="http://www.j10n.org/${PN}/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="suid" +RESTRICT="test" + +RDEPEND="net-libs/libtirpc" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-gentoo.patch" + "${FILESDIR}/${PN}-glibc-2.30.patch" + "${FILESDIR}/${PN}-rpc.patch" + "${FILESDIR}/${PN}-gettimeofday.patch" + "${FILESDIR}/${P}-timeval-in-utmp.patch" +) + +src_prepare() { + rm aclocal.m4 + + default + eautoreconf +} + +src_configure() { + econf \ + --with-libtirpc +} + +src_install() { + default + + # no static archives + find "${ED}" -name '*.la' -delete || die + + if use suid; then + fperms 4755 /usr/libexec/sptagent + fi +}
