If you compare both mathjax.py and hyphenation.py you will understand why the patch is needed. As opposed to mathjax, hyphenization always cleans itself in the beggining.
I'm packaging Calibre for xtradeb.net (unofficial). Usually, my package is kept very closely to the official one (Debian), but gets updated more frequently. Unless, I'm struggling a bit, like now. :-)
There are a lot of files that are no longer being shipped by default in the release tarball. Therefore, I decided to run all install subcommands to get them in place. I realized now, that the gui does not seem to be required, as it is automatically executed during setup.py install.
I still don't know how to get around the missing: resources/user-agent-data.json. I can confirm this is required by calibre when one tries to open a book. So, it needs further investigation.
If you compare both mathjax.py and hyphenation.py you will understand why the patch is needed. As opposed to mathjax, hyphenization always cleans itself in the beggining.
I'm packaging Calibre for xtradeb.net (unofficial). Usually, my package is kept very closely to the official one (Debian), but gets updated more frequently. Unless, I'm struggling a bit, like now. :-)
There are a lot of files that are no longer being shipped by default in the release tarball. Therefore, I decided to run all install subcommands to get them in place. I realized now, that the gui does not seem to be required, as it is automatically executed during setup.py install.
I started from here; https:/ /launchpad. net/~xtradeb/ +archive/ ubuntu/ apps/+sourcefil es/calibre/ 6.11.0+ dfsg-1~ xtradeb1/ calibre_ 6.11.0+ dfsg-1~ xtradeb1. debian. tar.xz
These are the changes I made to the previous recipe:
$cat debian/ patches/ 0025-Do- not-download- hyphenation- if_already- present. patch 6.12.0+ dfsg/setup/ hyphenation. py ======= ======= ======= ======= ======= ======= ======= ======= ==== 6.12.0+ dfsg.orig/ setup/hyphenati on.py 2023-02-10 15:31:50.728763069 +0100 6.12.0+ dfsg/setup/ hyphenation. py 2023-02-10 16:16:19.105858295 +0100 /github. com/LibreOffice /dictionaries/ archive/ %s.tar. gz' % VERSION USE_SYSTEM_ VERSION = False
Index: calibre-
=======
--- calibre-
+++ calibre-
@@ -87,7 +87,16 @@
DOWNLOAD_URL = 'https:/
CAN_
+ def already_ present( self): self.vendored_ dir, 'locales.json') exists( manifest) : present( ): 'hyphenation dictionaries already present in the resources directory, not downloading')
self. clean()
os.makedirs( self.vendored_ dir)
+ manifest = self.j(
+ if os.path.
+ return True
+ return False
+
def run(self, opts):
+ if self.already_
+ self.info(
+ return
with self.temp_dir() as dl_src, self.temp_dir() as output_dir:
$ diff {../calibre- 6.11.0+ dfsg/,} debian/ rules url="file: //$(CURDIR) /debian/ dictionaries/ master. tar.gz" name=dom_ load $(TEST_FLAGS) name=dom_ load $(TEST_FLAGS) t-change- book-file- unless- user-s- consent- Closes- .patch annotations_ in_ebook" ] = true/save_ annotations_ in_ebook" ] = false/' debian/ tmp/usr/ share/calibre/ viewer. js
40a41
> $(SETUP) hyphenation --hyphenation-
48a50,54
> [ -d build ] && $(SETUP) iso639
> [ -d build ] && $(SETUP) iso3166
> [ -d build ] && $(SETUP) translations
> # [ -d build ] && $(SETUP) gui
> [ -d build ] && $(SETUP) resources
60c66
< env LANGUAGE= LC_ALL=C LC_CTYPE=C LC_MESSAGES=C LANG=C TZ=UTC $(CI_ENV) $(SETUP) test --test-
---
> # env LANGUAGE= LC_ALL=C LC_CTYPE=C LC_MESSAGES=C LANG=C TZ=UTC $(CI_ENV) $(SETUP) test --test-
89a96,98
> #
> # # Complete patch: 0008-Don-
> sed 's/save_
96a106
> $(SETUP) hyphenation --clean
97a108,112
> # $(SETUP) iso639 --clean
> # $(SETUP) iso3166 --clean
> # $(SETUP) translations --clean
> # $(SETUP) gui --clean
> # $(SETUP) resources --clean
I still don't know how to get around the missing: resources/ user-agent- data.json. I can confirm this is required by calibre when one tries to open a book. So, it needs further investigation.