Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/files/, app-text/calibre/
Date: Mon, 14 Jun 2021 18:14:03
Message-Id: 1623694436.10deff717a7e89cf16544e9a6b965b870a57ed36.zmedico@gentoo
1 commit: 10deff717a7e89cf16544e9a6b965b870a57ed36
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 14 18:09:26 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 14 18:13:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10deff71
7
8 app-text/calibre: Remove old versions
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-text/calibre/Manifest | 7 -
14 app-text/calibre/calibre-4.22.0.ebuild | 277 ---------------------
15 app-text/calibre/calibre-4.23.0.ebuild | 278 ----------------------
16 app-text/calibre/calibre-5.13.0.ebuild | 264 --------------------
17 app-text/calibre/calibre-5.4.2-r1.ebuild | 265 ---------------------
18 app-text/calibre/calibre-5.6.0.ebuild | 264 --------------------
19 app-text/calibre/files/calibre-4.22.0-icu68.patch | 49 ----
20 7 files changed, 1404 deletions(-)
21
22 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
23 index 1cf88bab312..eae60e865b0 100644
24 --- a/app-text/calibre/Manifest
25 +++ b/app-text/calibre/Manifest
26 @@ -1,9 +1,2 @@
27 -DIST calibre-4.22.0.tar.xz 36924876 BLAKE2B 19576d5cfc1a4ed6a505ef46656675980b6736be01f55874951a9a0c81a70c82e23e723db1d81d13917eaf615e65752a100fbc1cb43bdca0b3c4543e3b17cf43 SHA512 b9db1c72cf010c25563e3f86a75478ac872249034b3c8b09bb8f0c2519487bb78dea821c9e45564fb645d17431bbee96459a28ee036e57830faedea4cd94b423
28 -DIST calibre-4.23.0.tar.xz 36908740 BLAKE2B 3a950ac2b3aade547bb686cc99b963357e76b5931049ecb4a5e09ddaf1db26c74fa3b4ebd74e42d83f68c5c9827c534c0247a3c6a9b000641a778cfe5ac33599 SHA512 2a512f29ddc2fed7f6a229314a9f7fceac198c9422b3be19078685032f1d1cb3b9258ac2609c33d15da20683c1277ed09419ea1e9bbc70430cdc676f60395719
29 -DIST calibre-5.13.0.tar.xz 36746972 BLAKE2B b011114fa558c2dd7418a449b2a43bbbbe6e850ad6ba14bdb8ee70d63b475839a6f489eb273c1c88eb841156feee1f0a6f13b19a38eab11820e8e14a05242a6d SHA512 99f2e007af70e4de9ffc05fc4ed41ac3e62ed5196d05e066ab2624e15694f8a0aa149769e0a2cf163f59e330ed7ab43bc938e65064ac2a9825d641b1735f13cf
30 DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbcffbf16248081ccf0ab313420fe3898954da71e0796b3d6c44e93c636113221f95fa6affc6be97bf41f4086a909b2849f9 SHA512 eb19e6bb328f60eb4af2c38d54c3d2a09989d41d71d27de10ab5ae443af902c3c12fc70042d4735dd785573cb63bb7d7a10ae5f7ed72afc1e1a9c6aacaf64aec
31 DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae
32 -DIST calibre-5.4.2-SIP-v4-04ad7b.patch 1534 BLAKE2B a0d3a49e13499ec55098c8639ba93c21e04a1b23b857ca8c7e0cb665f6e40b138f44a13c78b7a240784919effa9870817b2ec7ce5b494448807a4b77dd95b06f SHA512 f0acd97fc57bce9b22dd2061be7a85f4b39b7a9c3492304dec4108ede087a9e58ee886e21734823021709686dc1317f41eb1ac99a947a7dc07660b5c1849bc1b
33 -DIST calibre-5.4.2-SIP-v4.patch.xz 4640 BLAKE2B e8d20d9e23922885ecc3d24b7dd83579911dc83520037bad4e9323725c3127d348dc745dc725d137a3172e8891764355d3fcdee640a26cd6b142a2c26d00da0b SHA512 e79ee69ba0ca7e44c10c6670743889d0391d708e75c798e345e6228f483347f72b070e01e2a258590420a1eea6313d88d816817886747c699e6783bd965ab557
34 -DIST calibre-5.4.2.tar.xz 36596800 BLAKE2B 00373cdc9af56a8dacc70096d1e7925f8d3da4eaf37727ad58c211d18e6c593a21c3ad0f283048ae28b1bb83889c8c801baaa5e240eb65d972ebc78a79922ec1 SHA512 ef3839f5ff4ceecb3bbd6c84819d6f57cc4bb2a1ae789a9dcf8f029680bc778ef86f9c2eb01832c4990f68c2de892eedafa449205470cec4d86a3bbe9d4b4527
35 -DIST calibre-5.6.0.tar.xz 36653328 BLAKE2B 44941c50873c285aa552c5b4ac716e5d3dd6bc3e1a4f13b1003d42adb808566ec3a5083c683a40d9679524e4ae70eed6ec8bc4c70770991f9791bcea25387c42 SHA512 5d06b60467bbf332acb8666d4117407c2876cfe2726dca3e9d9ed5d77561614406c7150c2800aacefe3cecb0869c1cd7b2681eba27830248b3c32e362123d50f
36
37 diff --git a/app-text/calibre/calibre-4.22.0.ebuild b/app-text/calibre/calibre-4.22.0.ebuild
38 deleted file mode 100644
39 index 73be3fb3164..00000000000
40 --- a/app-text/calibre/calibre-4.22.0.ebuild
41 +++ /dev/null
42 @@ -1,277 +0,0 @@
43 -# Copyright 1999-2021 Gentoo Authors
44 -# Distributed under the terms of the GNU General Public License v2
45 -
46 -EAPI=7
47 -
48 -PYTHON_COMPAT=( python3_{7..8} )
49 -PYTHON_REQ_USE="sqlite,ssl"
50 -
51 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
52 -
53 -DESCRIPTION="Ebook management application"
54 -HOMEPAGE="https://calibre-ebook.com/"
55 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
56 -
57 -LICENSE="
58 - GPL-3+
59 - GPL-3
60 - GPL-2+
61 - GPL-2
62 - GPL-1+
63 - LGPL-3+
64 - LGPL-2.1+
65 - LGPL-2.1
66 - BSD
67 - MIT
68 - Old-MIT
69 - Apache-2.0
70 - public-domain
71 - || ( Artistic GPL-1+ )
72 - CC-BY-3.0
73 - OFL-1.1
74 - PSF-2
75 -"
76 -KEYWORDS="amd64 ~arm x86"
77 -SLOT="0"
78 -IUSE="ios +udisks"
79 -
80 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
81 -
82 -COMMON_DEPEND="${PYTHON_DEPS}
83 - >=app-text/hunspell-1.7:=
84 - >=app-text/podofo-0.9.6_pre20171027:=
85 - >=app-text/poppler-0.26.5[qt5]
86 - >=dev-libs/chmlib-0.40:=
87 - dev-libs/glib:2=
88 - dev-libs/hyphen:=
89 - >=dev-libs/icu-57.1:=
90 - dev-libs/libinput:=
91 - >=dev-libs/dbus-glib-0.106
92 - >=sys-apps/dbus-1.10.8
93 - $(python_gen_cond_dep '
94 - >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}]
95 - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
96 - >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}]
97 - >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}]
98 - >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}]
99 - >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}]
100 - dev-python/dnspython[${PYTHON_MULTI_USEDEP}]
101 - >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}]
102 - >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}]
103 - >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}]
104 - >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}]
105 - >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}]
106 - >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}]
107 - >=dev-python/msgpack-0.6.2[${PYTHON_MULTI_USEDEP}]
108 - >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}]
109 - >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}]
110 - >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}]
111 - >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}]
112 - >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}]
113 - >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}]
114 - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}]
115 - dev-python/regex[${PYTHON_MULTI_USEDEP}]
116 - dev-python/zeroconf[${PYTHON_MULTI_USEDEP}]
117 - ')
118 - dev-qt/qtcore:5=
119 - dev-qt/qtdbus:5=
120 - dev-qt/qtgui:5=[jpeg]
121 - >=dev-qt/qtwebengine-5.12
122 - dev-qt/qtwidgets:5=
123 - dev-util/desktop-file-utils
124 - dev-util/gtk-update-icon-cache
125 - media-fonts/liberation-fonts
126 - media-libs/fontconfig:=
127 - >=media-libs/freetype-2:=
128 - >=media-libs/libmtp-1.1.11:=
129 - >=media-libs/libwmf-0.2.8
130 - >=media-gfx/optipng-0.7.6
131 - >=sys-libs/zlib-1.2.11:=
132 - virtual/libusb:1=
133 - x11-libs/libxkbcommon:=
134 - x11-libs/libX11:=
135 - x11-libs/libXext:=
136 - x11-libs/libXrender:=
137 - x11-misc/shared-mime-info
138 - >=x11-misc/xdg-utils-1.0.2-r2
139 - ios? (
140 - >=app-pda/usbmuxd-1.0.8
141 - >=app-pda/libimobiledevice-1.2.0
142 - )
143 - udisks? ( virtual/libudev )"
144 -RDEPEND="${COMMON_DEPEND}
145 - udisks? ( sys-fs/udisks:2 )"
146 -DEPEND="${COMMON_DEPEND}
147 - $(python_gen_cond_dep '
148 - >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}]
149 - <dev-python/sip-5[${PYTHON_MULTI_USEDEP}]
150 - ')
151 - >=virtual/podofo-build-0.9.6_pre20171027
152 - virtual/pkgconfig"
153 -
154 -pkg_pretend() {
155 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
156 - eerror "Calibre cannot be built with this version of gcc."
157 - eerror "You need at least gcc-6.0"
158 - die "Your C compiler is too old for this package."
159 - fi
160 -}
161 -
162 -src_prepare() {
163 - # no_updates: do not annoy user with "new version is availible all the time
164 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
165 - eapply \
166 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
167 - "${FILESDIR}/${PN}-disable_plugins.patch"
168 -
169 - has_version ">=dev-libs/icu-68.1" && eapply "${FILESDIR}/${PN}-4.22.0-icu68.patch"
170 -
171 - eapply_user
172 -
173 - # Fix outdated version constant.
174 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
175 - # -i src/calibre/constants.py || \
176 - # die "sed failed to patch constants.py"
177 -
178 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
179 - # calls xdg-* (bug #258938).
180 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
181 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
182 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
183 - -e "s|, PreserveMIMEDefaults():|:|" \
184 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
185 - -e "s|cmd\[2\]|cmd[4]|" \
186 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
187 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
188 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
189 -
190 - # Disable unnecessary privilege dropping for bug #287067.
191 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
192 - -i setup/install.py || die "sed failed to patch install.py"
193 -
194 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
195 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
196 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
197 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
198 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
199 -'-i', 'Makefile'])" \
200 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
201 - -i setup/build.py || die "sed failed to patch build.py"
202 -}
203 -
204 -src_install() {
205 - # calibre works with python 3, so remove the python 2 constraint
206 - export CALIBRE_PY3_PORT=1
207 -
208 - # Bypass kbuildsycoca and update-mime-database in order to
209 - # avoid sandbox violations if xdg-mime tries to call them.
210 - cat - > "${T}/kbuildsycoca" <<-EOF
211 - #!${BASH}
212 - echo $0 : $@
213 - exit 0
214 - EOF
215 -
216 - cp "${T}"/{kbuildsycoca,update-mime-database} || die
217 - chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die
218 -
219 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
220 -
221 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
222 - # violation with kbuildsycoca as in bug #287067, comment #13.
223 - export -n DISPLAY
224 -
225 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
226 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
227 - # return _parse_localename(localename)
228 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
229 - # raise ValueError, 'unknown locale: %s' % localename
230 - #ValueError: unknown locale: 46
231 - export -n LANG LANGUAGE ${!LC_*}
232 - export LC_ALL=C.utf8 #709682
233 -
234 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
235 - # variables to point to our fake temporary $HOME.
236 - export HOME="${T}/fake_homedir"
237 - export XDG_CONFIG_HOME="${HOME}/.config"
238 - export XDG_DATA_HOME="${HOME}/.local/share"
239 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
240 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
241 -
242 - tc-export CC CXX
243 - # Bug #334243 - respect LDFLAGS when building extensions
244 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
245 - local libdir=$(get_libdir)
246 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
247 -
248 - addpredict /dev/dri #665310
249 -
250 - PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
251 - "${PYTHON}" setup.py install \
252 - --root="${D}" \
253 - --prefix="${EPREFIX}/usr" \
254 - --libdir="${EPREFIX}/usr/${libdir}" \
255 - --staging-root="${ED}/usr" \
256 - --staging-libdir="${ED}/usr/${libdir}" || die
257 -
258 - rm "${ED}/usr/share/applications/defaults.list" || die
259 - find "${ED}"/usr/share -type d -empty -delete
260 -
261 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
262 - local x
263 - for x in * ; do
264 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
265 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
266 - done
267 -
268 - einfo "Converting python shebangs"
269 - python_fix_shebang --force "${ED}"
270 -
271 - einfo "Compiling python modules"
272 - python_optimize "${ED}"/usr/lib/calibre
273 -
274 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
275 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
276 -
277 - bashcomp_alias calibre \
278 - lrfviewer \
279 - calibre-debug \
280 - ebook-meta \
281 - calibre-server \
282 - ebook-viewer \
283 - ebook-polish \
284 - fetch-ebook-metadata \
285 - lrf2lrs \
286 - ebook-convert \
287 - ebook-edit \
288 - calibre-smtp \
289 - ebook-device
290 -
291 -}
292 -
293 -pkg_preinst() {
294 - # Indentify stray directories from upstream's "Binary install"
295 - # method (see bug 622728).
296 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
297 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
298 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
299 -}
300 -
301 -pkg_postinst() {
302 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
303 - local x
304 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
305 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
306 - elog "Purging '${x}'"
307 - rm -rf "${x}"
308 - fi
309 - done
310 - xdg_desktop_database_update
311 - xdg_mimeinfo_database_update
312 - xdg_icon_cache_update
313 -}
314 -
315 -pkg_postrm() {
316 - xdg_desktop_database_update
317 - xdg_mimeinfo_database_update
318 - xdg_icon_cache_update
319 -}
320
321 diff --git a/app-text/calibre/calibre-4.23.0.ebuild b/app-text/calibre/calibre-4.23.0.ebuild
322 deleted file mode 100644
323 index ac0a731d05c..00000000000
324 --- a/app-text/calibre/calibre-4.23.0.ebuild
325 +++ /dev/null
326 @@ -1,278 +0,0 @@
327 -# Copyright 1999-2021 Gentoo Authors
328 -# Distributed under the terms of the GNU General Public License v2
329 -
330 -EAPI=7
331 -
332 -PYTHON_COMPAT=( python3_{7..8} )
333 -PYTHON_REQ_USE="sqlite,ssl"
334 -
335 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
336 -
337 -DESCRIPTION="Ebook management application"
338 -HOMEPAGE="https://calibre-ebook.com/"
339 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
340 -
341 -LICENSE="
342 - GPL-3+
343 - GPL-3
344 - GPL-2+
345 - GPL-2
346 - GPL-1+
347 - LGPL-3+
348 - LGPL-2.1+
349 - LGPL-2.1
350 - BSD
351 - MIT
352 - Old-MIT
353 - Apache-2.0
354 - public-domain
355 - || ( Artistic GPL-1+ )
356 - CC-BY-3.0
357 - OFL-1.1
358 - PSF-2
359 -"
360 -KEYWORDS="~amd64 ~arm ~x86"
361 -SLOT="0"
362 -IUSE="ios +udisks"
363 -
364 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
365 -
366 -COMMON_DEPEND="${PYTHON_DEPS}
367 - >=app-text/hunspell-1.7:=
368 - >=app-text/podofo-0.9.6_pre20171027:=
369 - >=app-text/poppler-0.26.5[qt5]
370 - >=dev-libs/chmlib-0.40:=
371 - dev-libs/glib:2=
372 - dev-libs/hyphen:=
373 - >=dev-libs/icu-57.1:=
374 - dev-libs/libinput:=
375 - >=dev-libs/dbus-glib-0.106
376 - >=sys-apps/dbus-1.10.8
377 - $(python_gen_cond_dep '
378 - >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}]
379 - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
380 - >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}]
381 - >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}]
382 - >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}]
383 - >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}]
384 - dev-python/dnspython[${PYTHON_MULTI_USEDEP}]
385 - >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}]
386 - >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}]
387 - >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}]
388 - >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}]
389 - >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}]
390 - >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}]
391 - >=dev-python/msgpack-0.6.2[${PYTHON_MULTI_USEDEP}]
392 - >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}]
393 - >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}]
394 - >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}]
395 - >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}]
396 - >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}]
397 - >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}]
398 - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}]
399 - dev-python/regex[${PYTHON_MULTI_USEDEP}]
400 - dev-python/zeroconf[${PYTHON_MULTI_USEDEP}]
401 - ')
402 - dev-qt/qtcore:5=
403 - dev-qt/qtdbus:5=
404 - dev-qt/qtgui:5=[jpeg]
405 - >=dev-qt/qtwebengine-5.12
406 - dev-qt/qtwidgets:5=
407 - dev-util/desktop-file-utils
408 - dev-util/gtk-update-icon-cache
409 - media-fonts/liberation-fonts
410 - media-libs/fontconfig:=
411 - >=media-libs/freetype-2:=
412 - >=media-libs/libmtp-1.1.11:=
413 - >=media-libs/libwmf-0.2.8
414 - >=media-gfx/optipng-0.7.6
415 - >=sys-libs/zlib-1.2.11:=
416 - virtual/libusb:1=
417 - x11-libs/libxkbcommon:=
418 - x11-libs/libX11:=
419 - x11-libs/libXext:=
420 - x11-libs/libXrender:=
421 - x11-misc/shared-mime-info
422 - >=x11-misc/xdg-utils-1.0.2-r2
423 - ios? (
424 - >=app-pda/usbmuxd-1.0.8
425 - >=app-pda/libimobiledevice-1.2.0
426 - )
427 - udisks? ( virtual/libudev )"
428 -RDEPEND="${COMMON_DEPEND}
429 - udisks? ( sys-fs/udisks:2 )"
430 -DEPEND="${COMMON_DEPEND}
431 - $(python_gen_cond_dep '
432 - >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}]
433 - <dev-python/sip-5[${PYTHON_MULTI_USEDEP}]
434 - ')
435 - >=virtual/podofo-build-0.9.6_pre20171027
436 - virtual/pkgconfig"
437 -
438 -pkg_pretend() {
439 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
440 - eerror "Calibre cannot be built with this version of gcc."
441 - eerror "You need at least gcc-6.0"
442 - die "Your C compiler is too old for this package."
443 - fi
444 -}
445 -
446 -src_prepare() {
447 - # no_updates: do not annoy user with "new version is availible all the time
448 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
449 - eapply \
450 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
451 - "${FILESDIR}/${PN}-disable_plugins.patch"
452 -
453 - has_version ">=dev-libs/icu-68.1" && eapply "${FILESDIR}/${PN}-4.22.0-icu68.patch"
454 -
455 - eapply_user
456 -
457 - # Fix outdated version constant.
458 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
459 - # -i src/calibre/constants.py || \
460 - # die "sed failed to patch constants.py"
461 -
462 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
463 - # calls xdg-* (bug #258938).
464 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
465 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
466 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
467 - -e "s|, PreserveMIMEDefaults():|:|" \
468 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
469 - -e "s|cmd\[2\]|cmd[4]|" \
470 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
471 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
472 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
473 -
474 - # Disable unnecessary privilege dropping for bug #287067.
475 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
476 - -i setup/install.py || die "sed failed to patch install.py"
477 -
478 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
479 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
480 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
481 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
482 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
483 -'-i', 'Makefile'])" \
484 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
485 - -i setup/build.py || die "sed failed to patch build.py"
486 -}
487 -
488 -src_install() {
489 - # calibre works with python 3, so remove the python 2 constraint
490 - export CALIBRE_PY3_PORT=1
491 -
492 - # Bypass kbuildsycoca and update-mime-database in order to
493 - # avoid sandbox violations if xdg-mime tries to call them.
494 - mkdir "${T}/bin" || die
495 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
496 - #!${BASH}
497 - echo $0 : $@
498 - exit 0
499 - EOF
500 -
501 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
502 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
503 -
504 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
505 -
506 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
507 - # violation with kbuildsycoca as in bug #287067, comment #13.
508 - export -n DISPLAY
509 -
510 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
511 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
512 - # return _parse_localename(localename)
513 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
514 - # raise ValueError, 'unknown locale: %s' % localename
515 - #ValueError: unknown locale: 46
516 - export -n LANG LANGUAGE ${!LC_*}
517 - export LC_ALL=C.utf8 #709682
518 -
519 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
520 - # variables to point to our fake temporary $HOME.
521 - export HOME="${T}/fake_homedir"
522 - export XDG_CONFIG_HOME="${HOME}/.config"
523 - export XDG_DATA_HOME="${HOME}/.local/share"
524 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
525 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
526 -
527 - tc-export CC CXX
528 - # Bug #334243 - respect LDFLAGS when building extensions
529 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
530 - local libdir=$(get_libdir)
531 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
532 -
533 - addpredict /dev/dri #665310
534 -
535 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
536 - "${PYTHON}" setup.py install \
537 - --root="${D}" \
538 - --prefix="${EPREFIX}/usr" \
539 - --libdir="${EPREFIX}/usr/${libdir}" \
540 - --staging-root="${ED}/usr" \
541 - --staging-libdir="${ED}/usr/${libdir}" || die
542 -
543 - rm "${ED}/usr/share/applications/defaults.list" || die
544 - find "${ED}"/usr/share -type d -empty -delete
545 -
546 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
547 - local x
548 - for x in * ; do
549 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
550 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
551 - done
552 -
553 - einfo "Converting python shebangs"
554 - python_fix_shebang --force "${ED}"
555 -
556 - einfo "Compiling python modules"
557 - python_optimize "${ED}"/usr/lib/calibre
558 -
559 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
560 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
561 -
562 - bashcomp_alias calibre \
563 - lrfviewer \
564 - calibre-debug \
565 - ebook-meta \
566 - calibre-server \
567 - ebook-viewer \
568 - ebook-polish \
569 - fetch-ebook-metadata \
570 - lrf2lrs \
571 - ebook-convert \
572 - ebook-edit \
573 - calibre-smtp \
574 - ebook-device
575 -
576 -}
577 -
578 -pkg_preinst() {
579 - # Indentify stray directories from upstream's "Binary install"
580 - # method (see bug 622728).
581 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
582 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
583 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
584 -}
585 -
586 -pkg_postinst() {
587 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
588 - local x
589 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
590 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
591 - elog "Purging '${x}'"
592 - rm -rf "${x}"
593 - fi
594 - done
595 - xdg_desktop_database_update
596 - xdg_mimeinfo_database_update
597 - xdg_icon_cache_update
598 -}
599 -
600 -pkg_postrm() {
601 - xdg_desktop_database_update
602 - xdg_mimeinfo_database_update
603 - xdg_icon_cache_update
604 -}
605
606 diff --git a/app-text/calibre/calibre-5.13.0.ebuild b/app-text/calibre/calibre-5.13.0.ebuild
607 deleted file mode 100644
608 index be03ce4ed47..00000000000
609 --- a/app-text/calibre/calibre-5.13.0.ebuild
610 +++ /dev/null
611 @@ -1,264 +0,0 @@
612 -# Copyright 1999-2021 Gentoo Authors
613 -# Distributed under the terms of the GNU General Public License v2
614 -
615 -EAPI=7
616 -
617 -PYTHON_COMPAT=( python3_{8..9} )
618 -PYTHON_REQ_USE="ipv6,sqlite,ssl"
619 -
620 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
621 -
622 -DESCRIPTION="Ebook management application"
623 -HOMEPAGE="https://calibre-ebook.com/"
624 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz
625 - https://dev.gentoo.org/~zmedico/dist/calibre-5.4.2-SIP-v4-04ad7b.patch
626 - https://dev.gentoo.org/~zmedico/dist/calibre-5.4.2-SIP-v4.patch.xz"
627 -
628 -LICENSE="
629 - GPL-3+
630 - GPL-3
631 - GPL-2+
632 - GPL-2
633 - GPL-1+
634 - LGPL-3+
635 - LGPL-2.1+
636 - LGPL-2.1
637 - BSD
638 - MIT
639 - Old-MIT
640 - Apache-2.0
641 - public-domain
642 - || ( Artistic GPL-1+ )
643 - CC-BY-3.0
644 - OFL-1.1
645 - PSF-2
646 -"
647 -KEYWORDS="~amd64 ~arm ~x86"
648 -SLOT="0"
649 -IUSE="ios +udisks"
650 -
651 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
652 -
653 -COMMON_DEPEND="${PYTHON_DEPS}
654 - >=app-text/hunspell-1.7:=
655 - >=app-text/podofo-0.9.6_pre20171027:=
656 - >=app-text/poppler-0.26.5[qt5]
657 - dev-libs/glib:2=
658 - dev-libs/hyphen:=
659 - >=dev-libs/icu-57.1:=
660 - dev-libs/libinput:=
661 - >=dev-libs/dbus-glib-0.106
662 - >=sys-apps/dbus-1.10.8
663 - $(python_gen_cond_dep '
664 - >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}]
665 - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
666 - >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}]
667 - >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}]
668 - >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}]
669 - >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}]
670 - dev-python/dnspython[${PYTHON_MULTI_USEDEP}]
671 - >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}]
672 - >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}]
673 - >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}]
674 - >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}]
675 - >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}]
676 - >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}]
677 - >=dev-python/msgpack-0.6.2[${PYTHON_MULTI_USEDEP}]
678 - >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}]
679 - >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}]
680 - >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}]
681 - >=dev-python/pychm-0.8.6[${PYTHON_MULTI_USEDEP}]
682 - >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}]
683 - >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}]
684 - >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}]
685 - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}]
686 - dev-python/regex[${PYTHON_MULTI_USEDEP}]
687 - dev-python/zeroconf[${PYTHON_MULTI_USEDEP}]
688 - ')
689 - dev-qt/qtcore:5=
690 - dev-qt/qtdbus:5=
691 - dev-qt/qtgui:5=[jpeg]
692 - >=dev-qt/qtwebengine-5.12
693 - dev-qt/qtwidgets:5=
694 - dev-util/desktop-file-utils
695 - dev-util/gtk-update-icon-cache
696 - media-fonts/liberation-fonts
697 - media-libs/fontconfig:=
698 - >=media-libs/freetype-2:=
699 - >=media-libs/libmtp-1.1.11:=
700 - >=media-libs/libwmf-0.2.8
701 - >=media-gfx/optipng-0.7.6
702 - >=sys-libs/zlib-1.2.11:=
703 - virtual/libusb:1=
704 - x11-libs/libxkbcommon:=
705 - x11-libs/libX11:=
706 - x11-libs/libXext:=
707 - x11-libs/libXrender:=
708 - x11-misc/shared-mime-info
709 - >=x11-misc/xdg-utils-1.0.2-r2
710 - ios? (
711 - >=app-pda/usbmuxd-1.0.8
712 - >=app-pda/libimobiledevice-1.2.0
713 - )
714 - udisks? ( virtual/libudev )"
715 -RDEPEND="${COMMON_DEPEND}
716 - udisks? ( sys-fs/udisks:2 )"
717 -DEPEND="${COMMON_DEPEND}
718 - $(python_gen_cond_dep '
719 - >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}]
720 - <dev-python/sip-5[${PYTHON_MULTI_USEDEP}]
721 - ')
722 - >=virtual/podofo-build-0.9.6_pre20171027
723 - virtual/pkgconfig"
724 -
725 -pkg_pretend() {
726 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
727 - eerror "Calibre cannot be built with this version of gcc."
728 - eerror "You need at least gcc-6.0"
729 - die "Your C compiler is too old for this package."
730 - fi
731 -}
732 -
733 -src_prepare() {
734 - # no_updates: do not annoy user with "new version is availible all the time
735 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
736 - eapply \
737 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
738 - "${FILESDIR}/${PN}-disable_plugins.patch" \
739 - "${DISTDIR}/${PN}-5.4.2-SIP-v4-04ad7b.patch" \
740 - "${WORKDIR}/${PN}-5.4.2-SIP-v4.patch"
741 -
742 - eapply_user
743 -
744 - # Fix outdated version constant.
745 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
746 - # -i src/calibre/constants.py || \
747 - # die "sed failed to patch constants.py"
748 -
749 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
750 - # calls xdg-* (bug #258938).
751 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
752 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
753 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
754 - -e "s|, PreserveMIMEDefaults():|:|" \
755 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
756 - -e "s|cmd\[2\]|cmd[4]|" \
757 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
758 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
759 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
760 -
761 - # Disable unnecessary privilege dropping for bug #287067.
762 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
763 - -i setup/install.py || die "sed failed to patch install.py"
764 -
765 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
766 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
767 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
768 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
769 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
770 -'-i', 'Makefile'])" \
771 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
772 - -i setup/build.py || die "sed failed to patch build.py"
773 -}
774 -
775 -src_install() {
776 - # calibre works with python 3, so remove the python 2 constraint
777 - export CALIBRE_PY3_PORT=1
778 -
779 - # Bypass kbuildsycoca and update-mime-database in order to
780 - # avoid sandbox violations if xdg-mime tries to call them.
781 - mkdir "${T}/bin" || die
782 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
783 - #!${BASH}
784 - echo $0 : $@
785 - exit 0
786 - EOF
787 -
788 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
789 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
790 -
791 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
792 -
793 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
794 - # violation with kbuildsycoca as in bug #287067, comment #13.
795 - export -n DISPLAY
796 -
797 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
798 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
799 - # return _parse_localename(localename)
800 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
801 - # raise ValueError, 'unknown locale: %s' % localename
802 - #ValueError: unknown locale: 46
803 - export -n LANG LANGUAGE ${!LC_*}
804 - export LC_ALL=C.utf8 #709682
805 -
806 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
807 - # variables to point to our fake temporary $HOME.
808 - export HOME="${T}/fake_homedir"
809 - export XDG_CONFIG_HOME="${HOME}/.config"
810 - export XDG_DATA_HOME="${HOME}/.local/share"
811 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
812 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
813 -
814 - tc-export CC CXX
815 - # Bug #334243 - respect LDFLAGS when building extensions
816 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
817 - local libdir=$(get_libdir)
818 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
819 -
820 - addpredict /dev/dri #665310
821 -
822 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
823 - "${PYTHON}" setup.py install \
824 - --root="${D}" \
825 - --prefix="${EPREFIX}/usr" \
826 - --libdir="${EPREFIX}/usr/${libdir}" \
827 - --staging-root="${ED}/usr" \
828 - --staging-libdir="${ED}/usr/${libdir}" || die
829 -
830 - find "${ED}"/usr/share -type d -empty -delete
831 -
832 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
833 - local x
834 - for x in * ; do
835 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
836 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
837 - done
838 -
839 - einfo "Converting python shebangs"
840 - python_fix_shebang --force "${ED}"
841 -
842 - einfo "Compiling python modules"
843 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
844 -
845 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
846 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
847 -}
848 -
849 -pkg_preinst() {
850 - # Indentify stray directories from upstream's "Binary install"
851 - # method (see bug 622728).
852 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
853 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
854 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
855 -}
856 -
857 -pkg_postinst() {
858 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
859 - local x
860 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
861 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
862 - elog "Purging '${x}'"
863 - rm -rf "${x}"
864 - fi
865 - done
866 - xdg_desktop_database_update
867 - xdg_mimeinfo_database_update
868 - xdg_icon_cache_update
869 -}
870 -
871 -pkg_postrm() {
872 - xdg_desktop_database_update
873 - xdg_mimeinfo_database_update
874 - xdg_icon_cache_update
875 -}
876
877 diff --git a/app-text/calibre/calibre-5.4.2-r1.ebuild b/app-text/calibre/calibre-5.4.2-r1.ebuild
878 deleted file mode 100644
879 index 237c69e913c..00000000000
880 --- a/app-text/calibre/calibre-5.4.2-r1.ebuild
881 +++ /dev/null
882 @@ -1,265 +0,0 @@
883 -# Copyright 1999-2021 Gentoo Authors
884 -# Distributed under the terms of the GNU General Public License v2
885 -
886 -EAPI=7
887 -
888 -PYTHON_COMPAT=( python3_{7..8} )
889 -PYTHON_REQ_USE="ipv6,sqlite,ssl"
890 -
891 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
892 -
893 -DESCRIPTION="Ebook management application"
894 -HOMEPAGE="https://calibre-ebook.com/"
895 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz
896 - https://dev.gentoo.org/~zmedico/dist/calibre-5.4.2-SIP-v4.patch.xz"
897 -
898 -LICENSE="
899 - GPL-3+
900 - GPL-3
901 - GPL-2+
902 - GPL-2
903 - GPL-1+
904 - LGPL-3+
905 - LGPL-2.1+
906 - LGPL-2.1
907 - BSD
908 - MIT
909 - Old-MIT
910 - Apache-2.0
911 - public-domain
912 - || ( Artistic GPL-1+ )
913 - CC-BY-3.0
914 - OFL-1.1
915 - PSF-2
916 -"
917 -KEYWORDS="~amd64 ~arm ~x86"
918 -SLOT="0"
919 -IUSE="ios +udisks"
920 -
921 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
922 -
923 -COMMON_DEPEND="${PYTHON_DEPS}
924 - >=app-text/hunspell-1.7:=
925 - >=app-text/podofo-0.9.6_pre20171027:=
926 - >=app-text/poppler-0.26.5[qt5]
927 - dev-libs/glib:2=
928 - dev-libs/hyphen:=
929 - >=dev-libs/icu-57.1:=
930 - dev-libs/libinput:=
931 - >=dev-libs/dbus-glib-0.106
932 - >=sys-apps/dbus-1.10.8
933 - $(python_gen_cond_dep '
934 - >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}]
935 - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
936 - >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}]
937 - >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}]
938 - >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}]
939 - >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}]
940 - dev-python/dnspython[${PYTHON_MULTI_USEDEP}]
941 - >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}]
942 - >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}]
943 - >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}]
944 - >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}]
945 - >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}]
946 - >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}]
947 - >=dev-python/msgpack-0.6.2[${PYTHON_MULTI_USEDEP}]
948 - >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}]
949 - >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}]
950 - >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}]
951 - >=dev-python/pychm-0.8.6[${PYTHON_MULTI_USEDEP}]
952 - >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}]
953 - >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}]
954 - >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}]
955 - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}]
956 - dev-python/regex[${PYTHON_MULTI_USEDEP}]
957 - dev-python/zeroconf[${PYTHON_MULTI_USEDEP}]
958 - ')
959 - dev-qt/qtcore:5=
960 - dev-qt/qtdbus:5=
961 - dev-qt/qtgui:5=[jpeg]
962 - >=dev-qt/qtwebengine-5.12
963 - dev-qt/qtwidgets:5=
964 - dev-util/desktop-file-utils
965 - dev-util/gtk-update-icon-cache
966 - media-fonts/liberation-fonts
967 - media-libs/fontconfig:=
968 - >=media-libs/freetype-2:=
969 - >=media-libs/libmtp-1.1.11:=
970 - >=media-libs/libwmf-0.2.8
971 - >=media-gfx/optipng-0.7.6
972 - >=sys-libs/zlib-1.2.11:=
973 - virtual/libusb:1=
974 - x11-libs/libxkbcommon:=
975 - x11-libs/libX11:=
976 - x11-libs/libXext:=
977 - x11-libs/libXrender:=
978 - x11-misc/shared-mime-info
979 - >=x11-misc/xdg-utils-1.0.2-r2
980 - ios? (
981 - >=app-pda/usbmuxd-1.0.8
982 - >=app-pda/libimobiledevice-1.2.0
983 - )
984 - udisks? ( virtual/libudev )"
985 -RDEPEND="${COMMON_DEPEND}
986 - udisks? ( sys-fs/udisks:2 )"
987 -DEPEND="${COMMON_DEPEND}
988 - $(python_gen_cond_dep '
989 - >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}]
990 - <dev-python/sip-5[${PYTHON_MULTI_USEDEP}]
991 - ')
992 - >=virtual/podofo-build-0.9.6_pre20171027
993 - virtual/pkgconfig"
994 -
995 -pkg_pretend() {
996 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
997 - eerror "Calibre cannot be built with this version of gcc."
998 - eerror "You need at least gcc-6.0"
999 - die "Your C compiler is too old for this package."
1000 - fi
1001 -}
1002 -
1003 -src_prepare() {
1004 - # no_updates: do not annoy user with "new version is availible all the time
1005 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
1006 - eapply \
1007 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
1008 - "${FILESDIR}/${PN}-disable_plugins.patch" \
1009 - "${WORKDIR}/${PN}-5.4.2-SIP-v4.patch"
1010 -
1011 - has_version ">=dev-libs/icu-68.1" && eapply "${FILESDIR}/${PN}-4.22.0-icu68.patch"
1012 -
1013 - eapply_user
1014 -
1015 - # Fix outdated version constant.
1016 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
1017 - # -i src/calibre/constants.py || \
1018 - # die "sed failed to patch constants.py"
1019 -
1020 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
1021 - # calls xdg-* (bug #258938).
1022 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
1023 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1024 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
1025 - -e "s|, PreserveMIMEDefaults():|:|" \
1026 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
1027 - -e "s|cmd\[2\]|cmd[4]|" \
1028 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1029 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
1030 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
1031 -
1032 - # Disable unnecessary privilege dropping for bug #287067.
1033 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
1034 - -i setup/install.py || die "sed failed to patch install.py"
1035 -
1036 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
1037 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
1038 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
1039 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
1040 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
1041 -'-i', 'Makefile'])" \
1042 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
1043 - -i setup/build.py || die "sed failed to patch build.py"
1044 -}
1045 -
1046 -src_install() {
1047 - # calibre works with python 3, so remove the python 2 constraint
1048 - export CALIBRE_PY3_PORT=1
1049 -
1050 - # Bypass kbuildsycoca and update-mime-database in order to
1051 - # avoid sandbox violations if xdg-mime tries to call them.
1052 - mkdir "${T}/bin" || die
1053 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
1054 - #!${BASH}
1055 - echo $0 : $@
1056 - exit 0
1057 - EOF
1058 -
1059 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1060 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1061 -
1062 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
1063 -
1064 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
1065 - # violation with kbuildsycoca as in bug #287067, comment #13.
1066 - export -n DISPLAY
1067 -
1068 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
1069 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
1070 - # return _parse_localename(localename)
1071 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
1072 - # raise ValueError, 'unknown locale: %s' % localename
1073 - #ValueError: unknown locale: 46
1074 - export -n LANG LANGUAGE ${!LC_*}
1075 - export LC_ALL=C.utf8 #709682
1076 -
1077 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
1078 - # variables to point to our fake temporary $HOME.
1079 - export HOME="${T}/fake_homedir"
1080 - export XDG_CONFIG_HOME="${HOME}/.config"
1081 - export XDG_DATA_HOME="${HOME}/.local/share"
1082 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
1083 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
1084 -
1085 - tc-export CC CXX
1086 - # Bug #334243 - respect LDFLAGS when building extensions
1087 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
1088 - local libdir=$(get_libdir)
1089 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
1090 -
1091 - addpredict /dev/dri #665310
1092 -
1093 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
1094 - "${PYTHON}" setup.py install \
1095 - --root="${D}" \
1096 - --prefix="${EPREFIX}/usr" \
1097 - --libdir="${EPREFIX}/usr/${libdir}" \
1098 - --staging-root="${ED}/usr" \
1099 - --staging-libdir="${ED}/usr/${libdir}" || die
1100 -
1101 - rm "${ED}/usr/share/applications/defaults.list" || die
1102 - find "${ED}"/usr/share -type d -empty -delete
1103 -
1104 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
1105 - local x
1106 - for x in * ; do
1107 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
1108 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
1109 - done
1110 -
1111 - einfo "Converting python shebangs"
1112 - python_fix_shebang --force "${ED}"
1113 -
1114 - einfo "Compiling python modules"
1115 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
1116 -
1117 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
1118 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
1119 -}
1120 -
1121 -pkg_preinst() {
1122 - # Indentify stray directories from upstream's "Binary install"
1123 - # method (see bug 622728).
1124 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
1125 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
1126 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
1127 -}
1128 -
1129 -pkg_postinst() {
1130 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
1131 - local x
1132 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
1133 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
1134 - elog "Purging '${x}'"
1135 - rm -rf "${x}"
1136 - fi
1137 - done
1138 - xdg_desktop_database_update
1139 - xdg_mimeinfo_database_update
1140 - xdg_icon_cache_update
1141 -}
1142 -
1143 -pkg_postrm() {
1144 - xdg_desktop_database_update
1145 - xdg_mimeinfo_database_update
1146 - xdg_icon_cache_update
1147 -}
1148
1149 diff --git a/app-text/calibre/calibre-5.6.0.ebuild b/app-text/calibre/calibre-5.6.0.ebuild
1150 deleted file mode 100644
1151 index 9c20538532c..00000000000
1152 --- a/app-text/calibre/calibre-5.6.0.ebuild
1153 +++ /dev/null
1154 @@ -1,264 +0,0 @@
1155 -# Copyright 1999-2021 Gentoo Authors
1156 -# Distributed under the terms of the GNU General Public License v2
1157 -
1158 -EAPI=7
1159 -
1160 -PYTHON_COMPAT=( python3_{8..9} )
1161 -PYTHON_REQ_USE="ipv6,sqlite,ssl"
1162 -
1163 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
1164 -
1165 -DESCRIPTION="Ebook management application"
1166 -HOMEPAGE="https://calibre-ebook.com/"
1167 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz
1168 - https://dev.gentoo.org/~zmedico/dist/calibre-5.4.2-SIP-v4.patch.xz"
1169 -
1170 -LICENSE="
1171 - GPL-3+
1172 - GPL-3
1173 - GPL-2+
1174 - GPL-2
1175 - GPL-1+
1176 - LGPL-3+
1177 - LGPL-2.1+
1178 - LGPL-2.1
1179 - BSD
1180 - MIT
1181 - Old-MIT
1182 - Apache-2.0
1183 - public-domain
1184 - || ( Artistic GPL-1+ )
1185 - CC-BY-3.0
1186 - OFL-1.1
1187 - PSF-2
1188 -"
1189 -KEYWORDS="~amd64 ~arm ~x86"
1190 -SLOT="0"
1191 -IUSE="ios +udisks"
1192 -
1193 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
1194 -
1195 -COMMON_DEPEND="${PYTHON_DEPS}
1196 - >=app-text/hunspell-1.7:=
1197 - >=app-text/podofo-0.9.6_pre20171027:=
1198 - >=app-text/poppler-0.26.5[qt5]
1199 - dev-libs/glib:2=
1200 - dev-libs/hyphen:=
1201 - >=dev-libs/icu-57.1:=
1202 - dev-libs/libinput:=
1203 - >=dev-libs/dbus-glib-0.106
1204 - >=sys-apps/dbus-1.10.8
1205 - $(python_gen_cond_dep '
1206 - >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}]
1207 - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}]
1208 - >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}]
1209 - >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}]
1210 - >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}]
1211 - >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}]
1212 - dev-python/dnspython[${PYTHON_MULTI_USEDEP}]
1213 - >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}]
1214 - >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}]
1215 - >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}]
1216 - >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}]
1217 - >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}]
1218 - >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}]
1219 - >=dev-python/msgpack-0.6.2[${PYTHON_MULTI_USEDEP}]
1220 - >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}]
1221 - >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}]
1222 - >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}]
1223 - >=dev-python/pychm-0.8.6[${PYTHON_MULTI_USEDEP}]
1224 - >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}]
1225 - >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}]
1226 - >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}]
1227 - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}]
1228 - dev-python/regex[${PYTHON_MULTI_USEDEP}]
1229 - dev-python/zeroconf[${PYTHON_MULTI_USEDEP}]
1230 - ')
1231 - dev-qt/qtcore:5=
1232 - dev-qt/qtdbus:5=
1233 - dev-qt/qtgui:5=[jpeg]
1234 - >=dev-qt/qtwebengine-5.12
1235 - dev-qt/qtwidgets:5=
1236 - dev-util/desktop-file-utils
1237 - dev-util/gtk-update-icon-cache
1238 - media-fonts/liberation-fonts
1239 - media-libs/fontconfig:=
1240 - >=media-libs/freetype-2:=
1241 - >=media-libs/libmtp-1.1.11:=
1242 - >=media-libs/libwmf-0.2.8
1243 - >=media-gfx/optipng-0.7.6
1244 - >=sys-libs/zlib-1.2.11:=
1245 - virtual/libusb:1=
1246 - x11-libs/libxkbcommon:=
1247 - x11-libs/libX11:=
1248 - x11-libs/libXext:=
1249 - x11-libs/libXrender:=
1250 - x11-misc/shared-mime-info
1251 - >=x11-misc/xdg-utils-1.0.2-r2
1252 - ios? (
1253 - >=app-pda/usbmuxd-1.0.8
1254 - >=app-pda/libimobiledevice-1.2.0
1255 - )
1256 - udisks? ( virtual/libudev )"
1257 -RDEPEND="${COMMON_DEPEND}
1258 - udisks? ( sys-fs/udisks:2 )"
1259 -DEPEND="${COMMON_DEPEND}
1260 - $(python_gen_cond_dep '
1261 - >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}]
1262 - <dev-python/sip-5[${PYTHON_MULTI_USEDEP}]
1263 - ')
1264 - >=virtual/podofo-build-0.9.6_pre20171027
1265 - virtual/pkgconfig"
1266 -
1267 -pkg_pretend() {
1268 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
1269 - eerror "Calibre cannot be built with this version of gcc."
1270 - eerror "You need at least gcc-6.0"
1271 - die "Your C compiler is too old for this package."
1272 - fi
1273 -}
1274 -
1275 -src_prepare() {
1276 - # no_updates: do not annoy user with "new version is availible all the time
1277 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
1278 - eapply \
1279 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
1280 - "${FILESDIR}/${PN}-disable_plugins.patch" \
1281 - "${WORKDIR}/${PN}-5.4.2-SIP-v4.patch"
1282 -
1283 - has_version ">=dev-libs/icu-68.1" && eapply "${FILESDIR}/${PN}-4.22.0-icu68.patch"
1284 -
1285 - eapply_user
1286 -
1287 - # Fix outdated version constant.
1288 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
1289 - # -i src/calibre/constants.py || \
1290 - # die "sed failed to patch constants.py"
1291 -
1292 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
1293 - # calls xdg-* (bug #258938).
1294 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
1295 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1296 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
1297 - -e "s|, PreserveMIMEDefaults():|:|" \
1298 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
1299 - -e "s|cmd\[2\]|cmd[4]|" \
1300 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1301 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
1302 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
1303 -
1304 - # Disable unnecessary privilege dropping for bug #287067.
1305 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
1306 - -i setup/install.py || die "sed failed to patch install.py"
1307 -
1308 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
1309 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
1310 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
1311 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
1312 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
1313 -'-i', 'Makefile'])" \
1314 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
1315 - -i setup/build.py || die "sed failed to patch build.py"
1316 -}
1317 -
1318 -src_install() {
1319 - # calibre works with python 3, so remove the python 2 constraint
1320 - export CALIBRE_PY3_PORT=1
1321 -
1322 - # Bypass kbuildsycoca and update-mime-database in order to
1323 - # avoid sandbox violations if xdg-mime tries to call them.
1324 - mkdir "${T}/bin" || die
1325 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
1326 - #!${BASH}
1327 - echo $0 : $@
1328 - exit 0
1329 - EOF
1330 -
1331 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1332 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1333 -
1334 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
1335 -
1336 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
1337 - # violation with kbuildsycoca as in bug #287067, comment #13.
1338 - export -n DISPLAY
1339 -
1340 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
1341 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
1342 - # return _parse_localename(localename)
1343 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
1344 - # raise ValueError, 'unknown locale: %s' % localename
1345 - #ValueError: unknown locale: 46
1346 - export -n LANG LANGUAGE ${!LC_*}
1347 - export LC_ALL=C.utf8 #709682
1348 -
1349 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
1350 - # variables to point to our fake temporary $HOME.
1351 - export HOME="${T}/fake_homedir"
1352 - export XDG_CONFIG_HOME="${HOME}/.config"
1353 - export XDG_DATA_HOME="${HOME}/.local/share"
1354 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
1355 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
1356 -
1357 - tc-export CC CXX
1358 - # Bug #334243 - respect LDFLAGS when building extensions
1359 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
1360 - local libdir=$(get_libdir)
1361 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
1362 -
1363 - addpredict /dev/dri #665310
1364 -
1365 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
1366 - "${PYTHON}" setup.py install \
1367 - --root="${D}" \
1368 - --prefix="${EPREFIX}/usr" \
1369 - --libdir="${EPREFIX}/usr/${libdir}" \
1370 - --staging-root="${ED}/usr" \
1371 - --staging-libdir="${ED}/usr/${libdir}" || die
1372 -
1373 - find "${ED}"/usr/share -type d -empty -delete
1374 -
1375 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
1376 - local x
1377 - for x in * ; do
1378 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
1379 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
1380 - done
1381 -
1382 - einfo "Converting python shebangs"
1383 - python_fix_shebang --force "${ED}"
1384 -
1385 - einfo "Compiling python modules"
1386 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
1387 -
1388 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
1389 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
1390 -}
1391 -
1392 -pkg_preinst() {
1393 - # Indentify stray directories from upstream's "Binary install"
1394 - # method (see bug 622728).
1395 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
1396 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
1397 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
1398 -}
1399 -
1400 -pkg_postinst() {
1401 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
1402 - local x
1403 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
1404 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
1405 - elog "Purging '${x}'"
1406 - rm -rf "${x}"
1407 - fi
1408 - done
1409 - xdg_desktop_database_update
1410 - xdg_mimeinfo_database_update
1411 - xdg_icon_cache_update
1412 -}
1413 -
1414 -pkg_postrm() {
1415 - xdg_desktop_database_update
1416 - xdg_mimeinfo_database_update
1417 - xdg_icon_cache_update
1418 -}
1419
1420 diff --git a/app-text/calibre/files/calibre-4.22.0-icu68.patch b/app-text/calibre/files/calibre-4.22.0-icu68.patch
1421 deleted file mode 100644
1422 index c4b3baf0570..00000000000
1423 --- a/app-text/calibre/files/calibre-4.22.0-icu68.patch
1424 +++ /dev/null
1425 @@ -1,49 +0,0 @@
1426 -From c211f9b17af410463ce9cfc9b1b100228b51720f Mon Sep 17 00:00:00 2001
1427 -From: Lars Wendler <polynomial-c@g.o>
1428 -Date: Sat, 31 Oct 2020 10:44:36 +0100
1429 -Subject: [PATCH] Fix build with icu-68.1
1430 -
1431 -icu-68.1 removed public macro definitions for TRUE and FALSE
1432 -
1433 -Signed-off-by: Lars Wendler <polynomial-c@g.o>
1434 ----
1435 - src/calibre/utils/icu.c | 4 ++--
1436 - src/calibre/utils/matcher.c | 1 -
1437 - 2 files changed, 2 insertions(+), 3 deletions(-)
1438 -
1439 -diff --git a/src/calibre/utils/icu.c b/src/calibre/utils/icu.c
1440 -index 62d05de310..4e918492d9 100644
1441 ---- a/src/calibre/utils/icu.c
1442 -+++ b/src/calibre/utils/icu.c
1443 -@@ -238,14 +238,14 @@ icu_Collator_contains(icu_Collator *self, PyObject *args) {
1444 -
1445 - a = python_to_icu(a_, &asz);
1446 - if (a == NULL) goto end;
1447 -- if (asz == 0) { found = TRUE; goto end; }
1448 -+ if (asz == 0) { found = 1; goto end; }
1449 - b = python_to_icu(b_, &bsz);
1450 - if (b == NULL) goto end;
1451 -
1452 - search = usearch_openFromCollator(a, asz, b, bsz, self->collator, NULL, &status);
1453 - if (U_SUCCESS(status)) {
1454 - pos = usearch_first(search, &status);
1455 -- if (pos != USEARCH_DONE) found = TRUE;
1456 -+ if (pos != USEARCH_DONE) found = 1;
1457 - }
1458 - end:
1459 - if (search != NULL) usearch_close(search);
1460 -diff --git a/src/calibre/utils/matcher.c b/src/calibre/utils/matcher.c
1461 -index f38a7082ce..8e57947867 100644
1462 ---- a/src/calibre/utils/matcher.c
1463 -+++ b/src/calibre/utils/matcher.c
1464 -@@ -15,7 +15,6 @@
1465 - #define inline
1466 - #endif
1467 -
1468 --typedef unsigned char bool;
1469 - #define TRUE 1
1470 - #define FALSE 0
1471 - #define MAX(x, y) ((x > y) ? x : y)
1472 ---
1473 -2.29.2
1474 -