Closed strogdon closed 7 years ago
Yes that would be a variant on the same theme. I guess I shouldn't include the symlinks in the tarball and get the ebuild to create them at install time. Not sure I'll be able to fix this today.
I was only trying to replicate that other issue and found this. I usually always build the docs. Generating the symlinks on the fly is what I thought to be a solution too. But this will require a lot of work.
I believe something like
diff --git a/sci-mathematics/sage/sage-8.0.ebuild b/sci-mathematics/sage/sage-8.0.ebuild
index 1e44c3c2..c1c62001 100644
--- a/sci-mathematics/sage/sage-8.0.ebuild
+++ b/sci-mathematics/sage/sage-8.0.ebuild
@@ -492,6 +492,16 @@ python_install() {
fi
if use doc-html-bin ; then
+ cp -r "${WORKDIR}"/html/_static build_doc/html/ || die "failed to copy _static folder"
+ # Create correct symlink to _static folder in prefix
+ if use prefix ; then
+ for sdir in `find build_doc/html -name _static` ; do
+ if [ $sdir != "build_doc/html/_static" ] ; then
+ rm -f $sdir || die "failed to remove $sdir symlink"
+ ln -s "${EPREFIX}"/usr/share/doc/sage/html/_static $sdir
+ fi
+ done
+ fi
insinto /usr/share/doc/sage/html
doins -r build_doc/html/*
fi
will fix this issue as well as https://github.com/cschwan/sage-on-gentoo/issues/490 since it appears the _static
folder is missing there. I only tested with L10N="en"
.
Another better solution will be to follow more recent guidelines for ebuilds and use relative links. The logic for that will be harder to implement. It will certainly help with prefix but I am not sure about #490
Actually GNU ln
provides the right tools for this, I am going to experiment but the html doc tarball will have to be regenerated.
Re-open if that doesn't fix it :)
This is similar to https://github.com/cschwan/sage-on-gentoo/issues/490 but with a different twist since it's in
Prefix
. The QA Notices:Looking at
sage-8.0-doc-html.tar.xz
one can see the difficulty. There are symlinks likewhich I believe are the source of the problem since
$EPREFIX
is missing in the symlink. This should work on Gentoo, but fixing this forPrefix
may be daunting. It is probably a corner case, but the documentation doesn't play nicely. The build was with