commit:     fd52dbeb4c26bcb6b5331def1eb65c1339f2036a
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 11 21:11:06 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Apr 11 21:11:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd52dbeb

sys-auth/nss_ldap: Fix libdir symlinks

Bug: https://bugs.gentoo.org/581306
Bug: https://bugs.gentoo.org/780108
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch  | 31 ++++++++++++++++++++++
 ...s_ldap-265-r8.ebuild => nss_ldap-265-r9.ebuild} | 10 +++----
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch 
b/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch
new file mode 100644
index 00000000000..d3609b604a2
--- /dev/null
+++ b/sys-auth/nss_ldap/files/nss_ldap-265-libdir.patch
@@ -0,0 +1,31 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -38,17 +38,13 @@
+ DEFS = @DEFS@
+ #INCLUDES = -I$(top_builddir) -I$(srcdir)
+ 
+-if GCC
+-MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory)
+-else
+ MULTI_OS_DIRECTORY=.
+-endif
+ 
+ if GLIBC
+-LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed 
-e 's|.*libc-\(.*\)\.so|\1|')
++LIBC_VERS = $(shell ls 
@GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed 
-e 's|.*libc-\(.*\)\.so|\1|')
+ NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so
+ 
+-NSS_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 
1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|')
++NSS_VERS = $(shell ls 
@GENTOO_PORTAGE_EPREFIX@/lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 
1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|')
+ NSS_LDAP_NSS_VERSIONED = libnss_ldap.so.$(NSS_VERS)
+ endif
+ 
+@@ -83,8 +79,6 @@
+       $(mkinstalldirs) $(DESTDIR)$(libdir)
+       $(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so 
$(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED)
+       (cd $(DESTDIR)$(libdir); ln -sf $(NSS_LDAP_LIBC_VERSIONED) 
$(NSS_LDAP_NSS_VERSIONED))
+-      $(mkinstalldirs) $(DESTDIR)/usr$(libdir)
+-      (cd $(DESTDIR)/usr$(libdir); ln -sf 
../..$(libdir)/$(NSS_LDAP_NSS_VERSIONED) .)
+ else
+       $(mkinstalldirs) $(DESTDIR)$(libdir)
+ if HPUX

diff --git a/sys-auth/nss_ldap/nss_ldap-265-r8.ebuild 
b/sys-auth/nss_ldap/nss_ldap-265-r9.ebuild
similarity index 94%
rename from sys-auth/nss_ldap/nss_ldap-265-r8.ebuild
rename to sys-auth/nss_ldap/nss_ldap-265-r9.ebuild
index e6ed3ba6fc3..749cdb870cf 100644
--- a/sys-auth/nss_ldap/nss_ldap-265-r8.ebuild
+++ b/sys-auth/nss_ldap/nss_ldap-265-r9.ebuild
@@ -12,7 +12,7 @@ SRC_URI="http://www.padl.com/download/${P}.tar.gz";
 SLOT="0"
 LICENSE="LGPL-2"
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~amd64-linux"
-IUSE="debug kerberos ssl sasl"
+IUSE="debug kerberos ssl sasl split-usr"
 
 DEPEND="
        >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}]
@@ -32,7 +32,7 @@ src_prepare() {
        # eprefixify is safe on non-Prefix systems, so go unconditional
        # Note: comment this out or make it conditional on 'use prefix'
        # if needs rebasing. Don't remove.
-       eapply "${FILESDIR}"/${P}-installdir.patch
+       eapply "${FILESDIR}"/${P}-libdir.patch
        eprefixify Makefile.am
 
        # bug 438692
@@ -121,8 +121,8 @@ multilib_src_install() {
 }
 
 multilib_src_install_all() {
-       # Dumb /usr/lib* -> /lib* symlinks gone wrong
-       rm -rf "${ED}"/usr/usr || die
+       use split-usr &&
+               dosym ../../$(get_libdir)/libnss_ldap.so.2 
/usr/$(get_libdir)/libnss_ldap.so.2
 
        insinto /etc
        doins ldap.conf
@@ -138,7 +138,7 @@ multilib_src_install_all() {
                CVSVersionInfo.txt README nsswitch.ldap certutil
 
        docinto docs
-       dodoc doc/*
+       dodoc -r doc/.
 }
 
 pkg_postinst() {

Reply via email to