media-sound/lilypond should build its own documentation (if USE=doc). It's fiddly, but it can be done; see bug 132706.
I don't think that works anymore.
It works fine for me with 2.10.23.
Your solution solves almost all sandbox violations but not the one for fontextract.pyc. Even if it did solve all problems I am not convinced this is the right way to solve this. See also: http://lists.gnu.org/archive/html/lilypond-devel/2007-04/msg00117.html
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34fef534dc8545266df9665e31b6758cfa0a585c commit 34fef534dc8545266df9665e31b6758cfa0a585c Author: Miroslav Šulc <fordfrog@gentoo.org> AuthorDate: 2020-09-05 11:22:34 +0000 Commit: Miroslav Šulc <fordfrog@gentoo.org> CommitDate: 2020-09-05 11:22:48 +0000 media-sound/lilypond: bump to 2.21.5 + updated live + doc use flag the doc use flag is for testing purposes now and to resolve all possible issues with building the documentation, i hope community can help with that Closes: https://bugs.gentoo.org/179178 Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org> media-sound/lilypond/Manifest | 1 + media-sound/lilypond/lilypond-2.21.5.ebuild | 143 ++++++++++++++++++++++++++++ media-sound/lilypond/lilypond-9999.ebuild | 23 +++-- 3 files changed, 161 insertions(+), 6 deletions(-)