Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnsl/
Date: Sun, 19 Sep 2021 01:00:55
Message-Id: 1632013238.1cc1dfc1a49a193dbfa2ff511ef606c58e4771c6.sam@gentoo
1 commit: 1cc1dfc1a49a193dbfa2ff511ef606c58e4771c6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 19 00:59:44 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 19 01:00:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cc1dfc1
7
8 net-libs/libnsl: use preserve-libs.eclass
9
10 PAM can depend on libnsl and we should be conservative
11 with anything involving critical system tooling.
12
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 .../{libnsl-2.0.0.ebuild => libnsl-2.0.0-r1.ebuild} | 21 +++++++++++++++------
16 1 file changed, 15 insertions(+), 6 deletions(-)
17
18 diff --git a/net-libs/libnsl/libnsl-2.0.0.ebuild b/net-libs/libnsl/libnsl-2.0.0-r1.ebuild
19 similarity index 62%
20 rename from net-libs/libnsl/libnsl-2.0.0.ebuild
21 rename to net-libs/libnsl/libnsl-2.0.0-r1.ebuild
22 index eb30d991895..99b3fb7a8a1 100644
23 --- a/net-libs/libnsl/libnsl-2.0.0.ebuild
24 +++ b/net-libs/libnsl/libnsl-2.0.0-r1.ebuild
25 @@ -3,22 +3,22 @@
26
27 EAPI=7
28
29 -inherit multilib-minimal
30 +inherit multilib-minimal preserve-libs
31
32 DESCRIPTION="Public client interface for NIS(YP) in a IPv6 ready version"
33 HOMEPAGE="https://github.com/thkukuk/libnsl"
34 SRC_URI="https://github.com/thkukuk/${PN}/releases/download/v${PV}/${P}.tar.xz"
35
36 +# This is a core package which is depended on by e.g. PAM in some cases.
37 +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users
38 +# with FEATURES="-preserved-libs" or another package manager if SONAME
39 +# changes.
40 SLOT="0/3"
41 LICENSE="LGPL-2.1+"
42 -
43 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
44 -
45 IUSE="static-libs"
46
47 -DEPEND="
48 - >=net-libs/libtirpc-1.2.0:=[${MULTILIB_USEDEP}]
49 -"
50 +DEPEND=">=net-libs/libtirpc-1.2.0:=[${MULTILIB_USEDEP}]"
51 RDEPEND="${DEPEND}
52 !<sys-libs/glibc-2.26
53 "
54 @@ -28,6 +28,7 @@ multilib_src_configure() {
55 --enable-shared
56 $(use_enable static-libs static)
57 )
58 +
59 ECONF_SOURCE=${S} econf "${myconf[@]}"
60 }
61
62 @@ -35,3 +36,11 @@ multilib_src_install_all() {
63 einstalldocs
64 find "${ED}" -type f -name '*.la' -delete || die
65 }
66 +
67 +pkg_preinst() {
68 + preserve_old_lib /usr/$(get_libdir)/libnsl.so.2
69 +}
70 +
71 +pkg_postinst() {
72 + preserve_old_lib_notify /usr/$(get_libdir)/libnsl.so.2
73 +}