commit:     13bd01105a6cfe4c33e75299ddd85585e7399acd
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Tue Oct  3 01:53:35 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 04:26:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13bd0110

app-text/calibre: various cleanups for out of date dependencies

Of note:
- dbus-python was deprecated and removed by the addition of jeepney
- cssselect was deprecated and removed by the addition of css-parser

The glib and libX* dependencies are an interesting bit of history. As
far as calibre is concerned, these have never been required (they are
not directly used). But the libheadless.so plugin which uses Qt private
APIs ends up inheriting a bunch of dependencies from Qt itself,
depending on whatever Qt internals get exposed by that private API. This
results in symbols inside libheadless.so linking to libraries that
QtCore also links to. We still have to rebuild libheadless.so on ever
update to Qt because private API, though. And the really fun bit is that
the dependencies do, of course, change over time. :) Currently libX* is
not actually used anymore, for example.

dbus-glib *looks* like it may have been superficially a recursive dep of
something else?

libwmf had extremely extremely old code in the calibre source tree which
could have compiled against it, but never really did so. There's a
custom encoder/decoder written in pure python.

zlib is not directly depended on by calibre, though some dependencies do
have to be built with USE=zlib which doesn't really help. For all direct
uses of zlib, calibre simply uses the python stdlib "zlib" module, which
is not optional anyway.

calibre has never been setuptools software, so that can be dropped.

There are two chardet modules of relevance: chardet and cchardet. At
runtime, calibre only uses the latter. The tests use both of them due to
reasons. We can avoid installing it except when USE=test.

PyQt-builder is used in the build system (and as the name implies, it is
a module for building code). It can be dropped to a build dependency.

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 | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/app-text/calibre/calibre-5.44.0-r2.ebuild 
b/app-text/calibre/calibre-5.44.0-r2.ebuild
index 1688bc6f62df..2e49cf2a9179 100644
--- a/app-text/calibre/calibre-5.44.0-r2.ebuild
+++ b/app-text/calibre/calibre-5.44.0-r2.ebuild
@@ -37,7 +37,9 @@ LICENSE="
 "
 KEYWORDS="~amd64 ~arm ~x86"
 SLOT="0"
-IUSE="ios +udisks"
+IUSE="ios test +udisks"
+
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
@@ -48,23 +50,16 @@ COMMON_DEPEND="${PYTHON_DEPS}
        >=app-text/podofo-0.9.6_pre20171027:=
        <app-text/podofo-0.10:=
        app-text/poppler[utils]
-       dev-libs/glib:2=
        dev-libs/hyphen:=
        >=dev-libs/icu-57.1:=
-       dev-libs/libinput:=
-       >=dev-libs/dbus-glib-0.106
        dev-libs/openssl:=
        dev-libs/snowball-stemmer:=
-       >=sys-apps/dbus-1.10.8
        $(python_gen_cond_dep '
                app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
                >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
                dev-python/beautifulsoup4[${PYTHON_USEDEP}]
                dev-python/cchardet[${PYTHON_USEDEP}]
-               >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
-               >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
                >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
-               >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
                dev-python/dnspython[${PYTHON_USEDEP}]
                >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
                >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
@@ -83,7 +78,6 @@ COMMON_DEPEND="${PYTHON_DEPS}
                >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
                dev-python/zeroconf[${PYTHON_USEDEP}]
                
>=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
-               >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
                
>=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
                dev-python/regex[${PYTHON_USEDEP}]
        ')
@@ -98,14 +92,8 @@ COMMON_DEPEND="${PYTHON_DEPS}
        media-libs/fontconfig:=
        >=media-libs/freetype-2:=
        >=media-libs/libmtp-1.1.11:=
-       >=media-libs/libwmf-0.2.8
        >=media-gfx/optipng-0.7.6
-       >=sys-libs/zlib-1.2.11:=
        virtual/libusb:1=
-       x11-libs/libxkbcommon:=
-       x11-libs/libX11:=
-       x11-libs/libXext:=
-       x11-libs/libXrender:=
        x11-misc/shared-mime-info
        >=x11-misc/xdg-utils-1.0.2-r2
        ios? (
@@ -115,9 +103,11 @@ COMMON_DEPEND="${PYTHON_DEPS}
        udisks? ( virtual/libudev )"
 RDEPEND="${COMMON_DEPEND}
        udisks? ( sys-fs/udisks:2 )"
-DEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}
+       test? ( $(python_gen_cond_dep 
'>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
+"
 BDEPEND="$(python_gen_cond_dep '
-               >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
+               >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
                >=dev-python/sip-5[${PYTHON_USEDEP}]
        ')
        >=virtual/podofo-build-0.9.6_pre20171027

Reply via email to