diff --git a/sys-libs/libxcrypt/libxcrypt-4.4.28.ebuild b/sys-libs/libxcrypt/libxcrypt-4.4.28.ebuild index 50aec10c1952..348064f7ff60 100644 --- a/sys-libs/libxcrypt/libxcrypt-4.4.28.ebuild +++ b/sys-libs/libxcrypt/libxcrypt-4.4.28.ebuild @@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{8..10} ) # NEED_BOOTSTRAP is for developers to quickly generate a tarball # for publishing to the tree. NEED_BOOTSTRAP="no" -inherit multibuild multilib python-any-r1 toolchain-funcs multilib-minimal +inherit eapi8-dosym multibuild multilib python-any-r1 toolchain-funcs multilib-minimal DESCRIPTION="Extended crypt library for descrypt, md5crypt, bcrypt, and others" HOMEPAGE="https://github.com/besser82/libxcrypt" @@ -258,7 +258,13 @@ multilib_src_install() { for lib_file in "${D}"$(get_xclibdir)/*$(get_libname); do 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}" + + # We already know we're in split-usr (checked above) + # See bug #843209 (also worth keeping in mind bug #802222 too) + local libdir_no_prefix=$(get_xclibdir) + libdir_no_prefix=${libdir_no_prefix#${EPREFIX}} + libdir_no_prefix=${libdir_no_prefix%/usr} + dosym8 -r "/$(get_libdir)/${lib_file_target}" "/usr/${libdir_no_prefix}/${lib_file_basename}" done rm "${D}"$(get_xclibdir)/*$(get_libname) || die "Removing symlinks in incorrect location failed" @@ -268,4 +274,4 @@ multilib_src_install() { ;; *) die "Unexpected MULTIBUILD_ID: ${MULTIBUILD_ID}";; esac -} +} \ No newline at end of file