From 4e1d7e84973a548a8040739984c4bd467d6f7838 Mon Sep 17 00:00:00 2001 From: David Roman Date: Thu, 3 Aug 2023 09:32:41 +0200 Subject: R-packages.eclass: fix package installation Instead of creating a symlink R/site-library -> /usr/share/doc do it otherwise, linking /usr/share/doc -> R/site-library. This way if nodoc is enabled symlinks won't be broken. Signed-off-by: David Roman Closes: https://github.com/gentoo/guru/pull/102 Signed-off-by: Florian Schmaus --- eclass/R-packages.eclass | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'eclass') diff --git a/eclass/R-packages.eclass b/eclass/R-packages.eclass index ed63cff46..6dac19a16 100644 --- a/eclass/R-packages.eclass +++ b/eclass/R-packages.eclass @@ -68,9 +68,11 @@ _movelink() { local source=${1} local dest=${2} if [[ -e "${source}" ]]; then - local rp_source="$(realpath ${source} || die)" - mv "${rp_source}" "${dest}" || die - cp -rsf "${dest}" "${rp_source}" || die + local rdir=/usr/$(get_libdir)/R/site-library/${CRAN_PN} + local rp_source="${rdir}/${source}" + insinto ${rdir} + doins -r ${source} + ln -s "${rp_source}" "${dest}" || die fi } @@ -162,11 +164,7 @@ R-packages_src_install() { fi if [[ -e doc ]]; then - pushd doc || die - for i in *; do - _movelink "${i}" "${EDOCDIR}/${i}" - done - popd || die + _movelink doc "${EDOCDIR}"/doc fi rm -f LICENSE || die -- cgit v1.2.3-65-gdbad