From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/files/, app-text/calibre/
Date: Tue, 2 Nov 2021 22:45:27 +0000 (UTC) [thread overview]
Message-ID: <1635893119.e4b531064e3ccf757e231d2073cbe4a6f15292ef.sam@gentoo> (raw)
commit: e4b531064e3ccf757e231d2073cbe4a6f15292ef
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 2 22:44:39 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 2 22:45:19 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4b53106
app-text/calibre: tidy up ebuild further
Signed-off-by: Sam James <sam <AT> gentoo.org>
app-text/calibre/calibre-5.31.1.ebuild | 40 ++++++++++++++--------
.../files/calibre-5.31.0-qt-image-test.patch | 11 ++++++
2 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/app-text/calibre/calibre-5.31.1.ebuild b/app-text/calibre/calibre-5.31.1.ebuild
index 2a71b980175..283305d4191 100644
--- a/app-text/calibre/calibre-5.31.1.ebuild
+++ b/app-text/calibre/calibre-5.31.1.ebuild
@@ -115,13 +115,23 @@ BDEPEND="$(python_gen_cond_dep '
virtual/pkgconfig"
PATCHES=(
- # no_updates: do not annoy user with "new version is availible all the time
+ # Don't prompt the user for updates - they've installed via
+ # an ebuild.
"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
# We don't (yet?) package libjxr and it seems to be dead upstream
# (last commit in 2017)
"${FILESDIR}/${PN}-5.31.0-jxr-test.patch"
+
+ # TODO:
+ # test_qt tries to load a bunch of images using Qt and it currently fails
+ # due to some presumably missing dependencies. This is important and
+ # we need to look into it, but at time of writing, none of the tests
+ # are even bring run, so I'd like to return to this later.
+ # We don't want to skip test_qt entirely, so just skip this particular
+ # assert for now.
+ "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
)
pkg_pretend() {
@@ -135,6 +145,18 @@ pkg_pretend() {
src_prepare() {
default
+ # Warning:
+ #
+ # While it might be rather tempting to add yet another sed here,
+ # please don't. There have been several bugs in Gentoo's packaging
+ # of calibre from seds-which-become-stale. Please consider
+ # creating a patch instead, but in any case, run the test suite
+ # and ensure it passes.
+ #
+ # If in doubt about a problem, checking Fedora or Arch Linux's packaging
+ # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
+ # contributor. Or just ask them.
+
# Fix outdated version constant.
#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
# -i src/calibre/constants.py || \
@@ -163,17 +185,6 @@ 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"
-
- # TODO:
- # test_qt tries to load a bunch of images using Qt and it currently fails
- # due to some presumably missing dependencies. This is important and
- # we need to look into it, but at time of writing, none of the tests
- # are even bring run, so I'd like to return to this later.
- # We don't want to skip test_qt entirely, so just skip this particular
- # assert for now.
- sed -i -e \
- "/Qt doesn't seem to be able to load some of its image plugins. Available plugins:/d" \
- src/calibre/test_build.py || die
}
src_compile() {
@@ -189,9 +200,8 @@ src_test() {
# - test_chardet (unpackaged Python dependency: cchardet)
# - test_unrar (unpackaged Python dependency: unrardll)
#
- # Note that we currently have a hack for test_qt in src_prepare!
- # CALIBRE_DEVELOP_FROM="${S}/src"
- # PYTHONPATH=${S}/calibre/utils:${S}/src/calibre:${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
+ # Note that we currently have a hack to skip one part of test_qt!
+ # See PATCHES for more.
CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
--exclude-test-name 7z \
--exclude-test-name test_chardet \
diff --git a/app-text/calibre/files/calibre-5.31.0-qt-image-test.patch b/app-text/calibre/files/calibre-5.31.0-qt-image-test.patch
new file mode 100644
index 00000000000..5c38e2d6a52
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.31.0-qt-image-test.patch
@@ -0,0 +1,11 @@
+
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -306,7 +306,6 @@ class BuildTest(unittest.TestCase):
+ # then it is a distro problem.
+ fmts = set(map(lambda x: x.data().decode('utf-8'), QImageReader.supportedImageFormats())) # no2to3
+ testf = {'jpg', 'png', 'svg', 'ico', 'gif', 'webp'}
+- self.assertEqual(testf.intersection(fmts), testf, "Qt doesn't seem to be able to load some of its image plugins. Available plugins: %s" % fmts)
+ data = P('images/blank.png', allow_user_override=False, data=True)
+ img = image_from_data(data)
+ image_from_data(P('catalog/mastheadImage.gif', allow_user_override=False, data=True))
next reply other threads:[~2021-11-02 22:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 22:45 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-23 7:20 [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/files/, app-text/calibre/ Eli Schwartz
2024-07-31 3:53 Eli Schwartz
2024-07-21 21:18 Eli Schwartz
2023-11-28 0:40 Zac Medico
2023-11-24 16:55 Sam James
2023-02-09 10:25 Andreas Sturmlechner
2021-10-22 6:29 Zac Medico
2021-08-26 23:58 Sam James
2021-06-14 18:13 Zac Medico
2020-11-28 22:50 Andreas K. Hüttel
2017-06-26 8:05 Zac Medico
2017-04-24 0:05 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1635893119.e4b531064e3ccf757e231d2073cbe4a6f15292ef.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox