From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 8 Feb 2020 00:17:34 +0000 (+0000) Subject: sys-libs/libxcrypt: Fix installation with USE="split-usr system". X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=37e41391d7c52a73bef95a72e37992744bf2cbc4;p=gentoo.git sys-libs/libxcrypt: Fix installation with USE="split-usr system". Do not install 3 unnecessary copies of full library (regular file) for each non-native ABI: /usr/$(get_libdir)/libcrypt.so /usr/$(get_libdir)/libowcrypt.so /usr/$(get_libdir)/libxcrypt.so Do not install unnecessary symlinks for each ABI: /usr/$(get_libdir)/libcrypt.so.2 /usr/$(get_libdir)/libowcrypt.so.2 /usr/$(get_libdir)/libxcrypt.so.2 Do not use gen_usr_ldscript(). No changes for other combinations of USE flags. Signed-off-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Patrick McLean --- diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.12-r2.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.12-r3.ebuild similarity index 84% rename from sys-libs/libxcrypt/libxcrypt-4.4.12-r2.ebuild rename to sys-libs/libxcrypt/libxcrypt-4.4.12-r3.ebuild index eb95be5ae561..166f638a5790 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.12-r2.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.12-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 2004-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) -inherit autotools multibuild python-any-r1 usr-ldscript multilib-minimal +inherit autotools multibuild python-any-r1 multilib-minimal DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others " SRC_URI="https://github.com/besser82/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" @@ -105,7 +105,7 @@ src_install() { ( shopt -s failglob || die "failglob failed" - # make sure out man pages don't collide with glibc or man-pages + # Make sure our man pages do not collide with glibc or man-pages. for manpage in "${ED}"/usr/share/man/man3/crypt{,_r}.?*; do mv -n "${manpage}" "$(dirname "${manpage}")/xcrypt_$(basename "${manpage}")" \ || die "mv failed" @@ -143,20 +143,17 @@ multilib_src_install() { fi if use system; then - # now try to find libraries and make sure to generate - # ldscripts for them + # Move versionless .so symlinks from /$(get_libdir) to /usr/$(get_libdir) + # to allow linker to correctly find shared libraries. shopt -s failglob || die "failglob failed" for lib_file in "${ED}"$(get_xclibdir)/*$(get_libname); do - libname="$(basename "${lib_file}")" - - cp -L "${lib_file}" \ - "${ED}/usr/$(get_xclibdir)/${libname}" \ - || die "copying ${libname} failed" - - gen_usr_ldscript ${libname} - dosym ${libname} /usr/$(get_xclibdir)/${libname}.2 + lib_file_basename="$(basename "${lib_file}")" + lib_file_target="$(basename "$(readlink -f "${lib_file}")")" + dosym "../../$(get_libdir)/${lib_file_target}" "/usr/$(get_xclibdir)/${lib_file_basename}" done + + rm "${ED}"$(get_xclibdir)/*$(get_libname) || die "removing symlinks in incorrect location failed" fi ) fi