commit: 95002b25c43cba964dfe2c11bf7ae2e876aadd9d
Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Oct 2 23:42:49 2023 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 04:26:03 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95002b25
app-text/calibre: prune unneeded runtime contents
A build-time compiler is installed. Getting rid of it is -124 KB which
isn't much but also is pure win.
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
app-text/calibre/calibre-5.44.0-r2.ebuild | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/app-text/calibre/calibre-5.44.0-r2.ebuild
b/app-text/calibre/calibre-5.44.0-r2.ebuild
index 46dfe4477827..8e1e182eb588 100644
--- a/app-text/calibre/calibre-5.44.0-r2.ebuild
+++ b/app-text/calibre/calibre-5.44.0-r2.ebuild
@@ -161,6 +161,20 @@ src_prepare() {
'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
-e "s|open(self.j(bdir, '.qmake.conf'),
'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS +=
${LDFLAGS}')|" \
-i setup/build.py || die "sed failed to patch build.py"
+
+ # This is only ever used at build time. It contains a small embedded
copy
+ # of the rapydscript-ng compiler usable inside of qtwebengine, if you
don't
+ # have rapydscript-ng (a nodejs package) itself installed. Its only
purpose
+ # is to build some resources that come bundled in dist tarballs
already...
+ # and which we may also need to regenerate e.g. to use system-mathjax.
+ #
+ # However, running qtwebengine violates the portage sandbox (among other
+ # things, it tries to create directories in /usr! amazing) so this is a
+ # wash anyway. The only real solution here is to package rapydscript-ng.
+ #
+ # We do not need it at build time, and *no one* needs it at install
time.
+ # Delete the cruft.
+ rm -r resources/rapydscript/ || die
}
src_compile() {