commit:     e5ac4e637b852b6028d6e9a7aacdd833361ec1e7
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Tue Oct 24 19:39:44 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov  8 16:26:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ac4e63

app-text/calibre: add USE dependency for unrar-based ebooks

unrardll is now packaged.

n.b. This USE + dependency is required for the default upstream
experience, but is nonetheless being added as default disabled. It
requires non-free software (app-arch/unrar) and is a relatively niche
use case. It is important that users have the *option* to use it if they
want, but my judgment is that it is a bad tradeoff to push it on them
by default when a better option exists.

Closes: https://bugs.gentoo.org/622856
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/calibre/calibre-6.29.0.ebuild | 9 +++++----
 app-text/calibre/metadata.xml          | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/app-text/calibre/calibre-6.29.0.ebuild 
b/app-text/calibre/calibre-6.29.0.ebuild
index 4dad3722b02b..d6c474831e8c 100644
--- a/app-text/calibre/calibre-6.29.0.ebuild
+++ b/app-text/calibre/calibre-6.29.0.ebuild
@@ -37,7 +37,7 @@ LICENSE="
 "
 KEYWORDS="~amd64"
 SLOT="0"
-IUSE="+font-subsetting ios speech +system-mathjax test +udisks"
+IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
 
 RESTRICT="!test? ( test )"
 
@@ -97,7 +97,9 @@ COMMON_DEPEND="${PYTHON_DEPS}
        )
        speech? ( $(python_gen_cond_dep 
'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
        system-mathjax? ( >=dev-libs/mathjax-3 )
-       udisks? ( virtual/libudev )"
+       udisks? ( virtual/libudev )
+       unrar? ( dev-python/unrardll )
+"
 RDEPEND="${COMMON_DEPEND}
        udisks? ( sys-fs/udisks:2 )"
 DEPEND="${COMMON_DEPEND}
@@ -182,14 +184,13 @@ src_test() {
        local _test_excludes=(
                # unpackaged Python dependency: py7zr
                7z
-               # unpackaged Python dependency: unrardll
-               test_unrar
                # unpackaged Python dependency: pyzstd
                test_zstd
                # tests if a completely unused module is bundled
                pycryptodome
 
                $(usev !speech speech_dispatcher)
+               $(usev !unrar test_unrar)
 
                # undocumented reasons
                test_mem_leaks

diff --git a/app-text/calibre/metadata.xml b/app-text/calibre/metadata.xml
index 469a9e3455c2..297825fe5afc 100644
--- a/app-text/calibre/metadata.xml
+++ b/app-text/calibre/metadata.xml
@@ -16,5 +16,6 @@
     <flag name="font-subsetting">Enable font subsetting support</flag>
     <flag name="speech">Enable text-to-speech support</flag>
     <flag name="system-mathjax">Use a system copy of mathjax</flag>
+    <flag name="unrar">Enable support for comic books compressed with the 
non-free Rar format</flag>
   </use>
 </pkgmetadata>

Reply via email to