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/
Date: Fri, 21 Jan 2022 04:11:46
Message-Id: 1642737042.806a16d524b54a2b8c554ce411f412b981524d89.zmedico@gentoo
1 commit: 806a16d524b54a2b8c554ce411f412b981524d89
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 21 03:50:42 2022 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 21 03:50:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=806a16d5
7
8 app-text/calibre: Remove old versions
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
12
13 app-text/calibre/Manifest | 6 -
14 app-text/calibre/calibre-5.25.0-r2.ebuild | 263 -------------------------
15 app-text/calibre/calibre-5.30.0.ebuild | 262 -------------------------
16 app-text/calibre/calibre-5.31.0.ebuild | 262 -------------------------
17 app-text/calibre/calibre-5.31.1.ebuild | 315 ------------------------------
18 app-text/calibre/calibre-5.32.0-r1.ebuild | 315 ------------------------------
19 app-text/calibre/calibre-5.33.0.ebuild | 315 ------------------------------
20 7 files changed, 1738 deletions(-)
21
22 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
23 index eb07bb98bda8..74be0f200b5e 100644
24 --- a/app-text/calibre/Manifest
25 +++ b/app-text/calibre/Manifest
26 @@ -1,9 +1,3 @@
27 DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbcffbf16248081ccf0ab313420fe3898954da71e0796b3d6c44e93c636113221f95fa6affc6be97bf41f4086a909b2849f9 SHA512 eb19e6bb328f60eb4af2c38d54c3d2a09989d41d71d27de10ab5ae443af902c3c12fc70042d4735dd785573cb63bb7d7a10ae5f7ed72afc1e1a9c6aacaf64aec
28 DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae
29 -DIST calibre-5.25.0.tar.xz 36849112 BLAKE2B f9cb423317ea1f5b22e7f3540708fd4fa6e7dff2d6d2c667755c74c4f46b72f52aac7672933c51efaf56a5ef57e573c8927649fe30570481c2057e5f757cdfde SHA512 7913fec188d8a8c40cf2768671836f6431d233ac53d1d683222a12f8a753a11cc4023fcfc1dd5ca8b27fd049fb579563b1cdd89624b824ce4eec7b438e25006e
30 -DIST calibre-5.30.0.tar.xz 37002224 BLAKE2B dc034c54a6ebee838652fe10b467bf8408f8dabd759108d617e2c9f64109e92afe0f2994c5df480ec4346c596361ccb63d0aaab2796edc4993ae0eef4222ba6d SHA512 c2d435ec9a8cfd5f76439f229cd9a7a7f4e829e44d9f2ff37003faf8a925df40cd77471d72d05a8d145bfc104bf92dbdd67ddacabc84e6e3cad055887530d8bd
31 -DIST calibre-5.31.0.tar.xz 36937976 BLAKE2B 55995aa8fc75ebee5506145ab7995ebcfd04dfa080eae48229a167e404cc4f091c27f9d9401656c52b1620b6d407904a6e454b0b693c6e194a871bc6fda30d4b SHA512 4a2926f86d4bb4e9b66312c9f988bdf9cbcf12096c76578259f9473f69f7e8c16f763934fbd2664ba8e3bd24fbe6a878c1e2a9df43152ea0fe0ba3d447dfed42
32 -DIST calibre-5.31.1.tar.xz 36943652 BLAKE2B 13fa46d4426f705f7af2de07a38ca2266148291ca054a1de65b11013907fa51eb7ebefb774988a0b471af31d62ba8eb890cd3fe687505976d9d70738fb64f538 SHA512 c9f8e7fef430961f51699eeda009a799b702b740c9999744b982dbd14d971557f76b31897853435f8947199ca3d65622bf974b2d2afadc813d292b64bc048121
33 -DIST calibre-5.32.0.tar.xz 37115596 BLAKE2B c26340a87f77f373de619a1120f572b21530ebb69ba47975c5fd27e00dc5e72bd23c7265065e25d82f8e964fbeac8a05cc6a08c2d361c4f0105702993230ebd4 SHA512 4ad46e169a0ce23b354d2443b615f2fa80ef69aa763a5f26431968c49af433becf736659daaeb8d8d07e4a2326698c920cafa9a74ac5a8b7bb2f82f0fee2f532
34 -DIST calibre-5.33.0.tar.xz 37075328 BLAKE2B a6bef8b8a2328c8920f3076ed677818810ba5e99ebcbe520b389b587578878c36b72a4bd1ed6d99aa5982c2860e00ca60743f7d1e808f5622f894d89cab26acf SHA512 e714d352de630df91467b6b3822471897d2c9d6ff05f643de15c1317b7fe32bc375fa462a9a0da07987668b7cf0ba1ca08b325686741742c6e1a6d8e91766813
35 DIST calibre-5.33.2.tar.xz 37081104 BLAKE2B 7ef40e39d47b10378918dcdefbec5925d9a43f47c345ccb6fd8811b99a2c417923467724f3ba92152b0951e473af7dd20dcb779e1fc6ad7970ac527fc06fe09c SHA512 5886730000005f4e36373ef6d0b3da4e4f06941886f05d1703420720c16aa913dcfca9358c33e4fcec764f0e4bd24e0223ff35421b41f1cc3f818d6d53896d64
36
37 diff --git a/app-text/calibre/calibre-5.25.0-r2.ebuild b/app-text/calibre/calibre-5.25.0-r2.ebuild
38 deleted file mode 100644
39 index 40fa50fcc405..000000000000
40 --- a/app-text/calibre/calibre-5.25.0-r2.ebuild
41 +++ /dev/null
42 @@ -1,263 +0,0 @@
43 -# Copyright 1999-2021 Gentoo Authors
44 -# Distributed under the terms of the GNU General Public License v2
45 -
46 -EAPI=8
47 -
48 -PYTHON_COMPAT=( python3_{8..9} )
49 -PYTHON_REQ_USE="ipv6(+),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/glib:2=
87 - dev-libs/hyphen:=
88 - >=dev-libs/icu-57.1:=
89 - dev-libs/libinput:=
90 - >=dev-libs/dbus-glib-0.106
91 - dev-libs/snowball-stemmer:=
92 - >=sys-apps/dbus-1.10.8
93 - $(python_gen_cond_dep '
94 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
95 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
96 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
97 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
98 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
99 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
100 - dev-python/dnspython[${PYTHON_USEDEP}]
101 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
102 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
103 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
104 - dev-python/jeepney[${PYTHON_USEDEP}]
105 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
106 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
107 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
108 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
109 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
110 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
111 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
112 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
113 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
114 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
115 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
116 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
117 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
118 - dev-python/regex[${PYTHON_USEDEP}]
119 - dev-python/zeroconf[${PYTHON_USEDEP}]
120 - ')
121 - dev-qt/qtcore:5=
122 - dev-qt/qtdbus:5=
123 - dev-qt/qtgui:5=[jpeg]
124 - >=dev-qt/qtwebengine-5.12
125 - dev-qt/qtwidgets:5=
126 - dev-util/desktop-file-utils
127 - dev-util/gtk-update-icon-cache
128 - media-fonts/liberation-fonts
129 - media-libs/fontconfig:=
130 - >=media-libs/freetype-2:=
131 - >=media-libs/libmtp-1.1.11:=
132 - >=media-libs/libwmf-0.2.8
133 - >=media-gfx/optipng-0.7.6
134 - >=sys-libs/zlib-1.2.11:=
135 - virtual/libusb:1=
136 - x11-libs/libxkbcommon:=
137 - x11-libs/libX11:=
138 - x11-libs/libXext:=
139 - x11-libs/libXrender:=
140 - x11-misc/shared-mime-info
141 - >=x11-misc/xdg-utils-1.0.2-r2
142 - ios? (
143 - >=app-pda/usbmuxd-1.0.8
144 - >=app-pda/libimobiledevice-1.2.0
145 - )
146 - udisks? ( virtual/libudev )"
147 -RDEPEND="${COMMON_DEPEND}
148 - udisks? ( sys-fs/udisks:2 )"
149 -DEPEND="${COMMON_DEPEND}
150 - $(python_gen_cond_dep '
151 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
152 - >=dev-python/sip-5[${PYTHON_USEDEP}]
153 - ')
154 - >=virtual/podofo-build-0.9.6_pre20171027
155 - virtual/pkgconfig"
156 -
157 -pkg_pretend() {
158 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
159 - eerror "Calibre cannot be built with this version of gcc."
160 - eerror "You need at least gcc-6.0"
161 - die "Your C compiler is too old for this package."
162 - fi
163 -}
164 -
165 -src_prepare() {
166 - # no_updates: do not annoy user with "new version is availible all the time
167 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
168 - eapply \
169 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
170 - "${FILESDIR}/${PN}-disable_plugins.patch"
171 -
172 - eapply_user
173 -
174 - # Fix outdated version constant.
175 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
176 - # -i src/calibre/constants.py || \
177 - # die "sed failed to patch constants.py"
178 -
179 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
180 - # calls xdg-* (bug #258938).
181 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
182 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
183 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
184 - -e "s|, PreserveMIMEDefaults():|:|" \
185 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
186 - -e "s|cmd\[2\]|cmd[4]|" \
187 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
188 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
189 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
190 -
191 - # Disable unnecessary privilege dropping for bug #287067.
192 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
193 - -i setup/install.py || die "sed failed to patch install.py"
194 -
195 - sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
196 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
197 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
198 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
199 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
200 -'-i', 'Makefile'])" \
201 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
202 - -i setup/build.py || die "sed failed to patch build.py"
203 -}
204 -
205 -src_install() {
206 - # calibre works with python 3, so remove the python 2 constraint
207 - export CALIBRE_PY3_PORT=1
208 -
209 - # Bypass kbuildsycoca and update-mime-database in order to
210 - # avoid sandbox violations if xdg-mime tries to call them.
211 - mkdir "${T}/bin" || die
212 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
213 - #!${BASH}
214 - echo $0 : $@
215 - exit 0
216 - EOF
217 -
218 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
219 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
220 -
221 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
222 -
223 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
224 - # violation with kbuildsycoca as in bug #287067, comment #13.
225 - export -n DISPLAY
226 -
227 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
228 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
229 - # return _parse_localename(localename)
230 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
231 - # raise ValueError, 'unknown locale: %s' % localename
232 - #ValueError: unknown locale: 46
233 - export -n LANG LANGUAGE ${!LC_*}
234 - export LC_ALL=C.utf8 #709682
235 -
236 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
237 - # variables to point to our fake temporary $HOME.
238 - export HOME="${T}/fake_homedir"
239 - export XDG_CONFIG_HOME="${HOME}/.config"
240 - export XDG_DATA_HOME="${HOME}/.local/share"
241 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
242 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
243 -
244 - tc-export CC CXX
245 - # Bug #334243 - respect LDFLAGS when building extensions
246 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
247 - local libdir=$(get_libdir)
248 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
249 -
250 - addpredict /dev/dri #665310
251 -
252 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
253 - "${PYTHON}" setup.py install \
254 - --root="${D}" \
255 - --prefix="${EPREFIX}/usr" \
256 - --libdir="${EPREFIX}/usr/${libdir}" \
257 - --staging-root="${ED}/usr" \
258 - --staging-libdir="${ED}/usr/${libdir}" || die
259 -
260 - find "${ED}"/usr/share -type d -empty -delete
261 -
262 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
263 - local x
264 - for x in * ; do
265 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
266 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
267 - done
268 -
269 - einfo "Converting python shebangs"
270 - python_fix_shebang --force "${ED}"
271 -
272 - einfo "Compiling python modules"
273 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
274 -
275 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
276 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
277 -}
278 -
279 -pkg_preinst() {
280 - # Indentify stray directories from upstream's "Binary install"
281 - # method (see bug 622728).
282 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
283 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
284 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
285 -}
286 -
287 -pkg_postinst() {
288 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
289 - local x
290 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
291 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
292 - elog "Purging '${x}'"
293 - rm -rf "${x}"
294 - fi
295 - done
296 - xdg_desktop_database_update
297 - xdg_mimeinfo_database_update
298 - xdg_icon_cache_update
299 -}
300 -
301 -pkg_postrm() {
302 - xdg_desktop_database_update
303 - xdg_mimeinfo_database_update
304 - xdg_icon_cache_update
305 -}
306
307 diff --git a/app-text/calibre/calibre-5.30.0.ebuild b/app-text/calibre/calibre-5.30.0.ebuild
308 deleted file mode 100644
309 index b01b4920f276..000000000000
310 --- a/app-text/calibre/calibre-5.30.0.ebuild
311 +++ /dev/null
312 @@ -1,262 +0,0 @@
313 -# Copyright 1999-2021 Gentoo Authors
314 -# Distributed under the terms of the GNU General Public License v2
315 -
316 -EAPI=8
317 -
318 -PYTHON_COMPAT=( python3_{8..9} )
319 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
320 -
321 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
322 -
323 -DESCRIPTION="Ebook management application"
324 -HOMEPAGE="https://calibre-ebook.com/"
325 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
326 -
327 -LICENSE="
328 - GPL-3+
329 - GPL-3
330 - GPL-2+
331 - GPL-2
332 - GPL-1+
333 - LGPL-3+
334 - LGPL-2.1+
335 - LGPL-2.1
336 - BSD
337 - MIT
338 - Old-MIT
339 - Apache-2.0
340 - public-domain
341 - || ( Artistic GPL-1+ )
342 - CC-BY-3.0
343 - OFL-1.1
344 - PSF-2
345 -"
346 -KEYWORDS="~amd64 ~arm ~x86"
347 -SLOT="0"
348 -IUSE="ios +udisks"
349 -
350 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
351 -
352 -COMMON_DEPEND="${PYTHON_DEPS}
353 - >=app-text/hunspell-1.7:=
354 - >=app-text/podofo-0.9.6_pre20171027:=
355 - >=app-text/poppler-0.26.5[qt5]
356 - dev-libs/glib:2=
357 - dev-libs/hyphen:=
358 - >=dev-libs/icu-57.1:=
359 - dev-libs/libinput:=
360 - >=dev-libs/dbus-glib-0.106
361 - dev-libs/snowball-stemmer:=
362 - >=sys-apps/dbus-1.10.8
363 - $(python_gen_cond_dep '
364 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
365 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
366 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
367 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
368 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
369 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
370 - dev-python/dnspython[${PYTHON_USEDEP}]
371 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
372 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
373 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
374 - dev-python/jeepney[${PYTHON_USEDEP}]
375 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
376 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
377 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
378 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
379 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
380 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
381 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
382 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
383 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
384 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
385 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
386 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
387 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
388 - dev-python/regex[${PYTHON_USEDEP}]
389 - dev-python/zeroconf[${PYTHON_USEDEP}]
390 - ')
391 - dev-qt/qtcore:5=
392 - dev-qt/qtdbus:5=
393 - dev-qt/qtgui:5=[jpeg]
394 - >=dev-qt/qtwebengine-5.12
395 - dev-qt/qtwidgets:5=
396 - dev-util/desktop-file-utils
397 - dev-util/gtk-update-icon-cache
398 - media-fonts/liberation-fonts
399 - media-libs/fontconfig:=
400 - >=media-libs/freetype-2:=
401 - >=media-libs/libmtp-1.1.11:=
402 - >=media-libs/libwmf-0.2.8
403 - >=media-gfx/optipng-0.7.6
404 - >=sys-libs/zlib-1.2.11:=
405 - virtual/libusb:1=
406 - x11-libs/libxkbcommon:=
407 - x11-libs/libX11:=
408 - x11-libs/libXext:=
409 - x11-libs/libXrender:=
410 - x11-misc/shared-mime-info
411 - >=x11-misc/xdg-utils-1.0.2-r2
412 - ios? (
413 - >=app-pda/usbmuxd-1.0.8
414 - >=app-pda/libimobiledevice-1.2.0
415 - )
416 - udisks? ( virtual/libudev )"
417 -RDEPEND="${COMMON_DEPEND}
418 - udisks? ( sys-fs/udisks:2 )"
419 -DEPEND="${COMMON_DEPEND}
420 - $(python_gen_cond_dep '
421 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
422 - >=dev-python/sip-5[${PYTHON_USEDEP}]
423 - ')
424 - >=virtual/podofo-build-0.9.6_pre20171027
425 - virtual/pkgconfig"
426 -
427 -pkg_pretend() {
428 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
429 - eerror "Calibre cannot be built with this version of gcc."
430 - eerror "You need at least gcc-6.0"
431 - die "Your C compiler is too old for this package."
432 - fi
433 -}
434 -
435 -src_prepare() {
436 - # no_updates: do not annoy user with "new version is availible all the time
437 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
438 - eapply \
439 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
440 - "${FILESDIR}/${PN}-disable_plugins.patch"
441 -
442 - eapply_user
443 -
444 - # Fix outdated version constant.
445 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
446 - # -i src/calibre/constants.py || \
447 - # die "sed failed to patch constants.py"
448 -
449 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
450 - # calls xdg-* (bug #258938).
451 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
452 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
453 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
454 - -e "s|, PreserveMIMEDefaults():|:|" \
455 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
456 - -e "s|cmd\[2\]|cmd[4]|" \
457 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
458 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
459 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
460 -
461 - # Disable unnecessary privilege dropping for bug #287067.
462 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
463 - -i setup/install.py || die "sed failed to patch install.py"
464 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
465 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
466 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
467 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
468 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
469 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
470 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
471 - -i setup/build.py || die "sed failed to patch build.py"
472 -}
473 -
474 -src_install() {
475 - # calibre works with python 3, so remove the python 2 constraint
476 - export CALIBRE_PY3_PORT=1
477 -
478 - # Bypass kbuildsycoca and update-mime-database in order to
479 - # avoid sandbox violations if xdg-mime tries to call them.
480 - mkdir "${T}/bin" || die
481 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
482 - #!${BASH}
483 - echo $0 : $@
484 - exit 0
485 - EOF
486 -
487 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
488 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
489 -
490 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
491 -
492 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
493 - # violation with kbuildsycoca as in bug #287067, comment #13.
494 - export -n DISPLAY
495 -
496 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
497 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
498 - # return _parse_localename(localename)
499 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
500 - # raise ValueError, 'unknown locale: %s' % localename
501 - #ValueError: unknown locale: 46
502 - export -n LANG LANGUAGE ${!LC_*}
503 - export LC_ALL=C.utf8 #709682
504 -
505 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
506 - # variables to point to our fake temporary $HOME.
507 - export HOME="${T}/fake_homedir"
508 - export XDG_CONFIG_HOME="${HOME}/.config"
509 - export XDG_DATA_HOME="${HOME}/.local/share"
510 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
511 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
512 -
513 - tc-export CC CXX
514 - # Bug #334243 - respect LDFLAGS when building extensions
515 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
516 - local libdir=$(get_libdir)
517 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
518 -
519 - addpredict /dev/dri #665310
520 -
521 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
522 - "${PYTHON}" setup.py install \
523 - --root="${D}" \
524 - --prefix="${EPREFIX}/usr" \
525 - --libdir="${EPREFIX}/usr/${libdir}" \
526 - --staging-root="${ED}/usr" \
527 - --staging-libdir="${ED}/usr/${libdir}" || die
528 -
529 - find "${ED}"/usr/share -type d -empty -delete
530 -
531 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
532 - local x
533 - for x in * ; do
534 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
535 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
536 - done
537 -
538 - einfo "Converting python shebangs"
539 - python_fix_shebang --force "${ED}"
540 -
541 - einfo "Compiling python modules"
542 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
543 -
544 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
545 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
546 -}
547 -
548 -pkg_preinst() {
549 - # Indentify stray directories from upstream's "Binary install"
550 - # method (see bug 622728).
551 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
552 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
553 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
554 -}
555 -
556 -pkg_postinst() {
557 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
558 - local x
559 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
560 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
561 - elog "Purging '${x}'"
562 - rm -rf "${x}"
563 - fi
564 - done
565 - xdg_desktop_database_update
566 - xdg_mimeinfo_database_update
567 - xdg_icon_cache_update
568 -}
569 -
570 -pkg_postrm() {
571 - xdg_desktop_database_update
572 - xdg_mimeinfo_database_update
573 - xdg_icon_cache_update
574 -}
575
576 diff --git a/app-text/calibre/calibre-5.31.0.ebuild b/app-text/calibre/calibre-5.31.0.ebuild
577 deleted file mode 100644
578 index b01b4920f276..000000000000
579 --- a/app-text/calibre/calibre-5.31.0.ebuild
580 +++ /dev/null
581 @@ -1,262 +0,0 @@
582 -# Copyright 1999-2021 Gentoo Authors
583 -# Distributed under the terms of the GNU General Public License v2
584 -
585 -EAPI=8
586 -
587 -PYTHON_COMPAT=( python3_{8..9} )
588 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
589 -
590 -inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
591 -
592 -DESCRIPTION="Ebook management application"
593 -HOMEPAGE="https://calibre-ebook.com/"
594 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
595 -
596 -LICENSE="
597 - GPL-3+
598 - GPL-3
599 - GPL-2+
600 - GPL-2
601 - GPL-1+
602 - LGPL-3+
603 - LGPL-2.1+
604 - LGPL-2.1
605 - BSD
606 - MIT
607 - Old-MIT
608 - Apache-2.0
609 - public-domain
610 - || ( Artistic GPL-1+ )
611 - CC-BY-3.0
612 - OFL-1.1
613 - PSF-2
614 -"
615 -KEYWORDS="~amd64 ~arm ~x86"
616 -SLOT="0"
617 -IUSE="ios +udisks"
618 -
619 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
620 -
621 -COMMON_DEPEND="${PYTHON_DEPS}
622 - >=app-text/hunspell-1.7:=
623 - >=app-text/podofo-0.9.6_pre20171027:=
624 - >=app-text/poppler-0.26.5[qt5]
625 - dev-libs/glib:2=
626 - dev-libs/hyphen:=
627 - >=dev-libs/icu-57.1:=
628 - dev-libs/libinput:=
629 - >=dev-libs/dbus-glib-0.106
630 - dev-libs/snowball-stemmer:=
631 - >=sys-apps/dbus-1.10.8
632 - $(python_gen_cond_dep '
633 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
634 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
635 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
636 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
637 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
638 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
639 - dev-python/dnspython[${PYTHON_USEDEP}]
640 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
641 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
642 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
643 - dev-python/jeepney[${PYTHON_USEDEP}]
644 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
645 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
646 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
647 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
648 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
649 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
650 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
651 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
652 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
653 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
654 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
655 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
656 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
657 - dev-python/regex[${PYTHON_USEDEP}]
658 - dev-python/zeroconf[${PYTHON_USEDEP}]
659 - ')
660 - dev-qt/qtcore:5=
661 - dev-qt/qtdbus:5=
662 - dev-qt/qtgui:5=[jpeg]
663 - >=dev-qt/qtwebengine-5.12
664 - dev-qt/qtwidgets:5=
665 - dev-util/desktop-file-utils
666 - dev-util/gtk-update-icon-cache
667 - media-fonts/liberation-fonts
668 - media-libs/fontconfig:=
669 - >=media-libs/freetype-2:=
670 - >=media-libs/libmtp-1.1.11:=
671 - >=media-libs/libwmf-0.2.8
672 - >=media-gfx/optipng-0.7.6
673 - >=sys-libs/zlib-1.2.11:=
674 - virtual/libusb:1=
675 - x11-libs/libxkbcommon:=
676 - x11-libs/libX11:=
677 - x11-libs/libXext:=
678 - x11-libs/libXrender:=
679 - x11-misc/shared-mime-info
680 - >=x11-misc/xdg-utils-1.0.2-r2
681 - ios? (
682 - >=app-pda/usbmuxd-1.0.8
683 - >=app-pda/libimobiledevice-1.2.0
684 - )
685 - udisks? ( virtual/libudev )"
686 -RDEPEND="${COMMON_DEPEND}
687 - udisks? ( sys-fs/udisks:2 )"
688 -DEPEND="${COMMON_DEPEND}
689 - $(python_gen_cond_dep '
690 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
691 - >=dev-python/sip-5[${PYTHON_USEDEP}]
692 - ')
693 - >=virtual/podofo-build-0.9.6_pre20171027
694 - virtual/pkgconfig"
695 -
696 -pkg_pretend() {
697 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
698 - eerror "Calibre cannot be built with this version of gcc."
699 - eerror "You need at least gcc-6.0"
700 - die "Your C compiler is too old for this package."
701 - fi
702 -}
703 -
704 -src_prepare() {
705 - # no_updates: do not annoy user with "new version is availible all the time
706 - # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
707 - eapply \
708 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
709 - "${FILESDIR}/${PN}-disable_plugins.patch"
710 -
711 - eapply_user
712 -
713 - # Fix outdated version constant.
714 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
715 - # -i src/calibre/constants.py || \
716 - # die "sed failed to patch constants.py"
717 -
718 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
719 - # calls xdg-* (bug #258938).
720 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
721 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
722 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
723 - -e "s|, PreserveMIMEDefaults():|:|" \
724 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
725 - -e "s|cmd\[2\]|cmd[4]|" \
726 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
727 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
728 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
729 -
730 - # Disable unnecessary privilege dropping for bug #287067.
731 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
732 - -i setup/install.py || die "sed failed to patch install.py"
733 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
734 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
735 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
736 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
737 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
738 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
739 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
740 - -i setup/build.py || die "sed failed to patch build.py"
741 -}
742 -
743 -src_install() {
744 - # calibre works with python 3, so remove the python 2 constraint
745 - export CALIBRE_PY3_PORT=1
746 -
747 - # Bypass kbuildsycoca and update-mime-database in order to
748 - # avoid sandbox violations if xdg-mime tries to call them.
749 - mkdir "${T}/bin" || die
750 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
751 - #!${BASH}
752 - echo $0 : $@
753 - exit 0
754 - EOF
755 -
756 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
757 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
758 -
759 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
760 -
761 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
762 - # violation with kbuildsycoca as in bug #287067, comment #13.
763 - export -n DISPLAY
764 -
765 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
766 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
767 - # return _parse_localename(localename)
768 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
769 - # raise ValueError, 'unknown locale: %s' % localename
770 - #ValueError: unknown locale: 46
771 - export -n LANG LANGUAGE ${!LC_*}
772 - export LC_ALL=C.utf8 #709682
773 -
774 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
775 - # variables to point to our fake temporary $HOME.
776 - export HOME="${T}/fake_homedir"
777 - export XDG_CONFIG_HOME="${HOME}/.config"
778 - export XDG_DATA_HOME="${HOME}/.local/share"
779 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
780 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
781 -
782 - tc-export CC CXX
783 - # Bug #334243 - respect LDFLAGS when building extensions
784 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
785 - local libdir=$(get_libdir)
786 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
787 -
788 - addpredict /dev/dri #665310
789 -
790 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
791 - "${PYTHON}" setup.py install \
792 - --root="${D}" \
793 - --prefix="${EPREFIX}/usr" \
794 - --libdir="${EPREFIX}/usr/${libdir}" \
795 - --staging-root="${ED}/usr" \
796 - --staging-libdir="${ED}/usr/${libdir}" || die
797 -
798 - find "${ED}"/usr/share -type d -empty -delete
799 -
800 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
801 - local x
802 - for x in * ; do
803 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
804 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
805 - done
806 -
807 - einfo "Converting python shebangs"
808 - python_fix_shebang --force "${ED}"
809 -
810 - einfo "Compiling python modules"
811 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
812 -
813 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
814 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
815 -}
816 -
817 -pkg_preinst() {
818 - # Indentify stray directories from upstream's "Binary install"
819 - # method (see bug 622728).
820 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
821 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
822 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
823 -}
824 -
825 -pkg_postinst() {
826 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
827 - local x
828 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
829 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
830 - elog "Purging '${x}'"
831 - rm -rf "${x}"
832 - fi
833 - done
834 - xdg_desktop_database_update
835 - xdg_mimeinfo_database_update
836 - xdg_icon_cache_update
837 -}
838 -
839 -pkg_postrm() {
840 - xdg_desktop_database_update
841 - xdg_mimeinfo_database_update
842 - xdg_icon_cache_update
843 -}
844
845 diff --git a/app-text/calibre/calibre-5.31.1.ebuild b/app-text/calibre/calibre-5.31.1.ebuild
846 deleted file mode 100644
847 index 4c142f046ab5..000000000000
848 --- a/app-text/calibre/calibre-5.31.1.ebuild
849 +++ /dev/null
850 @@ -1,315 +0,0 @@
851 -# Copyright 1999-2021 Gentoo Authors
852 -# Distributed under the terms of the GNU General Public License v2
853 -
854 -EAPI=8
855 -
856 -PYTHON_COMPAT=( python3_{8..9} )
857 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
858 -
859 -inherit toolchain-funcs python-single-r1 xdg-utils
860 -
861 -DESCRIPTION="Ebook management application"
862 -HOMEPAGE="https://calibre-ebook.com/"
863 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
864 -
865 -LICENSE="
866 - GPL-3+
867 - GPL-3
868 - GPL-2+
869 - GPL-2
870 - GPL-1+
871 - LGPL-3+
872 - LGPL-2.1+
873 - LGPL-2.1
874 - BSD
875 - MIT
876 - Old-MIT
877 - Apache-2.0
878 - public-domain
879 - || ( Artistic GPL-1+ )
880 - CC-BY-3.0
881 - OFL-1.1
882 - PSF-2
883 -"
884 -KEYWORDS="~amd64 ~arm ~x86"
885 -SLOT="0"
886 -IUSE="ios +udisks"
887 -
888 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
889 -
890 -COMMON_DEPEND="${PYTHON_DEPS}
891 - >=app-text/hunspell-1.7:=
892 - >=app-text/podofo-0.9.6_pre20171027:=
893 - >=app-text/poppler-0.26.5[qt5]
894 - dev-libs/glib:2=
895 - dev-libs/hyphen:=
896 - >=dev-libs/icu-57.1:=
897 - dev-libs/libinput:=
898 - >=dev-libs/dbus-glib-0.106
899 - dev-libs/snowball-stemmer:=
900 - >=sys-apps/dbus-1.10.8
901 - $(python_gen_cond_dep '
902 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
903 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
904 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
905 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
906 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
907 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
908 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
909 - dev-python/dnspython[${PYTHON_USEDEP}]
910 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
911 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
912 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
913 - dev-python/jeepney[${PYTHON_USEDEP}]
914 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
915 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
916 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
917 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
918 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
919 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
920 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
921 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
922 - dev-python/pycryptodome[${PYTHON_USEDEP}]
923 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
924 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
925 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
926 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
927 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
928 - dev-python/regex[${PYTHON_USEDEP}]
929 - dev-python/zeroconf[${PYTHON_USEDEP}]
930 - ')
931 - dev-qt/qtcore:5=
932 - dev-qt/qtdbus:5=
933 - dev-qt/qtgui:5=[jpeg]
934 - >=dev-qt/qtwebengine-5.12
935 - dev-qt/qtwidgets:5=
936 - dev-util/desktop-file-utils
937 - dev-util/gtk-update-icon-cache
938 - media-fonts/liberation-fonts
939 - media-libs/fontconfig:=
940 - >=media-libs/freetype-2:=
941 - >=media-libs/libmtp-1.1.11:=
942 - >=media-libs/libwmf-0.2.8
943 - >=media-gfx/optipng-0.7.6
944 - >=sys-libs/zlib-1.2.11:=
945 - virtual/libusb:1=
946 - x11-libs/libxkbcommon:=
947 - x11-libs/libX11:=
948 - x11-libs/libXext:=
949 - x11-libs/libXrender:=
950 - x11-misc/shared-mime-info
951 - >=x11-misc/xdg-utils-1.0.2-r2
952 - ios? (
953 - >=app-pda/usbmuxd-1.0.8
954 - >=app-pda/libimobiledevice-1.2.0
955 - )
956 - udisks? ( virtual/libudev )"
957 -RDEPEND="${COMMON_DEPEND}
958 - udisks? ( sys-fs/udisks:2 )"
959 -DEPEND="${COMMON_DEPEND}"
960 -BDEPEND="$(python_gen_cond_dep '
961 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
962 - >=dev-python/sip-5[${PYTHON_USEDEP}]
963 - ')
964 - >=virtual/podofo-build-0.9.6_pre20171027
965 - virtual/pkgconfig"
966 -
967 -PATCHES=(
968 - # Don't prompt the user for updates - they've installed via
969 - # an ebuild.
970 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
971 -
972 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
973 - # We don't (yet?) package libjxr and it seems to be dead upstream
974 - # (last commit in 2017)
975 - "${FILESDIR}/${PN}-5.31.0-jxr-test.patch"
976 -
977 - # TODO:
978 - # test_qt tries to load a bunch of images using Qt and it currently fails
979 - # due to some presumably missing dependencies. This is important and
980 - # we need to look into it, but at time of writing, none of the tests
981 - # are even bring run, so I'd like to return to this later.
982 - # We don't want to skip test_qt entirely, so just skip this particular
983 - # assert for now.
984 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
985 -)
986 -
987 -pkg_pretend() {
988 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
989 - eerror "Calibre cannot be built with this version of gcc."
990 - eerror "You need at least gcc-6.0"
991 - die "Your C compiler is too old for this package."
992 - fi
993 -}
994 -
995 -src_prepare() {
996 - default
997 -
998 - # Warning:
999 - #
1000 - # While it might be rather tempting to add yet another sed here,
1001 - # please don't. There have been several bugs in Gentoo's packaging
1002 - # of calibre from seds-which-become-stale. Please consider
1003 - # creating a patch instead, but in any case, run the test suite
1004 - # and ensure it passes.
1005 - #
1006 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
1007 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
1008 - # contributor. Or just ask them.
1009 -
1010 - # Fix outdated version constant.
1011 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
1012 - # -i src/calibre/constants.py || \
1013 - # die "sed failed to patch constants.py"
1014 -
1015 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
1016 - # calls xdg-* (bug #258938).
1017 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
1018 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1019 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
1020 - -e "s|, PreserveMIMEDefaults():|:|" \
1021 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
1022 - -e "s|cmd\[2\]|cmd[4]|" \
1023 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1024 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
1025 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
1026 -
1027 - # Disable unnecessary privilege dropping for bug #287067.
1028 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
1029 - -i setup/install.py || die "sed failed to patch install.py"
1030 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
1031 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
1032 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
1033 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
1034 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
1035 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
1036 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
1037 - -i setup/build.py || die "sed failed to patch build.py"
1038 -}
1039 -
1040 -src_compile() {
1041 - # TODO: get qmake called by setup.py to respect CC and CXX too
1042 - tc-export CC CXX
1043 -
1044 - # bug 821871
1045 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
1046 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
1047 -
1048 - PATH="${T}/bin:${PATH}" ${EPYTHON} setup.py build || die
1049 -}
1050 -
1051 -src_test() {
1052 - # Skipped tests:
1053 - # - 7z (unpackaged Python dependency: py7zr)
1054 - # - test_chardet (unpackaged Python dependency: cchardet)
1055 - # - test_unrar (unpackaged Python dependency: unrardll)
1056 - #
1057 - # Note that we currently have a hack to skip one part of test_qt!
1058 - # See PATCHES for more.
1059 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
1060 - --exclude-test-name 7z \
1061 - --exclude-test-name test_chardet \
1062 - --exclude-test-name test_unrar || die
1063 -}
1064 -
1065 -src_install() {
1066 - # calibre works with python 3, so remove the python 2 constraint
1067 - export CALIBRE_PY3_PORT=1
1068 -
1069 - # Bypass kbuildsycoca and update-mime-database in order to
1070 - # avoid sandbox violations if xdg-mime tries to call them.
1071 - mkdir "${T}/bin" || die
1072 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
1073 - #!${BASH}
1074 - echo $0 : $@
1075 - exit 0
1076 - EOF
1077 -
1078 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1079 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1080 -
1081 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
1082 -
1083 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
1084 - # violation with kbuildsycoca as in bug #287067, comment #13.
1085 - export -n DISPLAY
1086 -
1087 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
1088 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
1089 - # return _parse_localename(localename)
1090 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
1091 - # raise ValueError, 'unknown locale: %s' % localename
1092 - #ValueError: unknown locale: 46
1093 - export -n LANG LANGUAGE ${!LC_*}
1094 - export LC_ALL=C.utf8 #709682
1095 -
1096 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
1097 - # variables to point to our fake temporary $HOME.
1098 - export HOME="${T}/fake_homedir"
1099 - export XDG_CONFIG_HOME="${HOME}/.config"
1100 - export XDG_DATA_HOME="${HOME}/.local/share"
1101 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
1102 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
1103 -
1104 - tc-export CC CXX
1105 - # Bug #334243 - respect LDFLAGS when building extensions
1106 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
1107 - local libdir=$(get_libdir)
1108 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
1109 -
1110 - addpredict /dev/dri #665310
1111 -
1112 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
1113 - "${PYTHON}" setup.py install \
1114 - --root="${D}" \
1115 - --prefix="${EPREFIX}/usr" \
1116 - --libdir="${EPREFIX}/usr/${libdir}" \
1117 - --staging-root="${ED}/usr" \
1118 - --staging-libdir="${ED}/usr/${libdir}" || die
1119 -
1120 - find "${ED}"/usr/share -type d -empty -delete
1121 -
1122 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
1123 - local x
1124 - for x in * ; do
1125 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
1126 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
1127 - done
1128 -
1129 - einfo "Converting python shebangs"
1130 - python_fix_shebang --force "${ED}"
1131 -
1132 - einfo "Compiling python modules"
1133 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
1134 -
1135 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
1136 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
1137 -}
1138 -
1139 -pkg_preinst() {
1140 - # Indentify stray directories from upstream's "Binary install"
1141 - # method (see bug 622728).
1142 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
1143 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
1144 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
1145 -}
1146 -
1147 -pkg_postinst() {
1148 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
1149 - local x
1150 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
1151 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
1152 - elog "Purging '${x}'"
1153 - rm -rf "${x}"
1154 - fi
1155 - done
1156 - xdg_desktop_database_update
1157 - xdg_mimeinfo_database_update
1158 - xdg_icon_cache_update
1159 -}
1160 -
1161 -pkg_postrm() {
1162 - xdg_desktop_database_update
1163 - xdg_mimeinfo_database_update
1164 - xdg_icon_cache_update
1165 -}
1166
1167 diff --git a/app-text/calibre/calibre-5.32.0-r1.ebuild b/app-text/calibre/calibre-5.32.0-r1.ebuild
1168 deleted file mode 100644
1169 index 7b6a8c3a07b4..000000000000
1170 --- a/app-text/calibre/calibre-5.32.0-r1.ebuild
1171 +++ /dev/null
1172 @@ -1,315 +0,0 @@
1173 -# Copyright 1999-2021 Gentoo Authors
1174 -# Distributed under the terms of the GNU General Public License v2
1175 -
1176 -EAPI=8
1177 -
1178 -PYTHON_COMPAT=( python3_{8..9} )
1179 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
1180 -
1181 -inherit toolchain-funcs python-single-r1 xdg-utils
1182 -
1183 -DESCRIPTION="Ebook management application"
1184 -HOMEPAGE="https://calibre-ebook.com/"
1185 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
1186 -
1187 -LICENSE="
1188 - GPL-3+
1189 - GPL-3
1190 - GPL-2+
1191 - GPL-2
1192 - GPL-1+
1193 - LGPL-3+
1194 - LGPL-2.1+
1195 - LGPL-2.1
1196 - BSD
1197 - MIT
1198 - Old-MIT
1199 - Apache-2.0
1200 - public-domain
1201 - || ( Artistic GPL-1+ )
1202 - CC-BY-3.0
1203 - OFL-1.1
1204 - PSF-2
1205 -"
1206 -KEYWORDS="~amd64 ~arm ~x86"
1207 -SLOT="0"
1208 -IUSE="ios +udisks"
1209 -
1210 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
1211 -
1212 -COMMON_DEPEND="${PYTHON_DEPS}
1213 - >=app-text/hunspell-1.7:=
1214 - >=app-text/podofo-0.9.6_pre20171027:=
1215 - >=app-text/poppler-0.26.5[qt5]
1216 - dev-libs/glib:2=
1217 - dev-libs/hyphen:=
1218 - >=dev-libs/icu-57.1:=
1219 - dev-libs/libinput:=
1220 - >=dev-libs/dbus-glib-0.106
1221 - dev-libs/snowball-stemmer:=
1222 - >=sys-apps/dbus-1.10.8
1223 - $(python_gen_cond_dep '
1224 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
1225 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
1226 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
1227 - dev-python/cchardet[${PYTHON_USEDEP}]
1228 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
1229 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
1230 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
1231 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
1232 - dev-python/dnspython[${PYTHON_USEDEP}]
1233 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
1234 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
1235 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
1236 - dev-python/jeepney[${PYTHON_USEDEP}]
1237 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
1238 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
1239 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
1240 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
1241 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
1242 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
1243 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
1244 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
1245 - dev-python/pycryptodome[${PYTHON_USEDEP}]
1246 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
1247 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
1248 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
1249 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
1250 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
1251 - dev-python/regex[${PYTHON_USEDEP}]
1252 - dev-python/zeroconf[${PYTHON_USEDEP}]
1253 - ')
1254 - dev-qt/qtcore:5=
1255 - dev-qt/qtdbus:5=
1256 - dev-qt/qtgui:5=[jpeg]
1257 - >=dev-qt/qtwebengine-5.12
1258 - dev-qt/qtwidgets:5=
1259 - dev-util/desktop-file-utils
1260 - dev-util/gtk-update-icon-cache
1261 - media-fonts/liberation-fonts
1262 - media-libs/fontconfig:=
1263 - >=media-libs/freetype-2:=
1264 - >=media-libs/libmtp-1.1.11:=
1265 - >=media-libs/libwmf-0.2.8
1266 - >=media-gfx/optipng-0.7.6
1267 - >=sys-libs/zlib-1.2.11:=
1268 - virtual/libusb:1=
1269 - x11-libs/libxkbcommon:=
1270 - x11-libs/libX11:=
1271 - x11-libs/libXext:=
1272 - x11-libs/libXrender:=
1273 - x11-misc/shared-mime-info
1274 - >=x11-misc/xdg-utils-1.0.2-r2
1275 - ios? (
1276 - >=app-pda/usbmuxd-1.0.8
1277 - >=app-pda/libimobiledevice-1.2.0
1278 - )
1279 - udisks? ( virtual/libudev )"
1280 -RDEPEND="${COMMON_DEPEND}
1281 - udisks? ( sys-fs/udisks:2 )"
1282 -DEPEND="${COMMON_DEPEND}"
1283 -BDEPEND="$(python_gen_cond_dep '
1284 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
1285 - >=dev-python/sip-5[${PYTHON_USEDEP}]
1286 - ')
1287 - >=virtual/podofo-build-0.9.6_pre20171027
1288 - virtual/pkgconfig"
1289 -
1290 -PATCHES=(
1291 - # Don't prompt the user for updates - they've installed via
1292 - # an ebuild.
1293 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
1294 -
1295 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
1296 - # We don't (yet?) package libjxr and it seems to be dead upstream
1297 - # (last commit in 2017)
1298 - "${FILESDIR}/${PN}-5.31.0-jxr-test.patch"
1299 -
1300 - # TODO:
1301 - # test_qt tries to load a bunch of images using Qt and it currently fails
1302 - # due to some presumably missing dependencies. This is important and
1303 - # we need to look into it, but at time of writing, none of the tests
1304 - # are even bring run, so I'd like to return to this later.
1305 - # We don't want to skip test_qt entirely, so just skip this particular
1306 - # assert for now.
1307 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
1308 -)
1309 -
1310 -pkg_pretend() {
1311 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
1312 - eerror "Calibre cannot be built with this version of gcc."
1313 - eerror "You need at least gcc-6.0"
1314 - die "Your C compiler is too old for this package."
1315 - fi
1316 -}
1317 -
1318 -src_prepare() {
1319 - default
1320 -
1321 - # Warning:
1322 - #
1323 - # While it might be rather tempting to add yet another sed here,
1324 - # please don't. There have been several bugs in Gentoo's packaging
1325 - # of calibre from seds-which-become-stale. Please consider
1326 - # creating a patch instead, but in any case, run the test suite
1327 - # and ensure it passes.
1328 - #
1329 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
1330 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
1331 - # contributor. Or just ask them.
1332 -
1333 - # Fix outdated version constant.
1334 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
1335 - # -i src/calibre/constants.py || \
1336 - # die "sed failed to patch constants.py"
1337 -
1338 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
1339 - # calls xdg-* (bug #258938).
1340 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
1341 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1342 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
1343 - -e "s|, PreserveMIMEDefaults():|:|" \
1344 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
1345 - -e "s|cmd\[2\]|cmd[4]|" \
1346 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1347 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
1348 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
1349 -
1350 - # Disable unnecessary privilege dropping for bug #287067.
1351 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
1352 - -i setup/install.py || die "sed failed to patch install.py"
1353 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
1354 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
1355 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
1356 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
1357 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
1358 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
1359 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
1360 - -i setup/build.py || die "sed failed to patch build.py"
1361 -}
1362 -
1363 -src_compile() {
1364 - # TODO: get qmake called by setup.py to respect CC and CXX too
1365 - tc-export CC CXX
1366 -
1367 - # bug 821871
1368 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
1369 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
1370 -
1371 - PATH="${T}/bin:${PATH}" ${EPYTHON} setup.py build || die
1372 -}
1373 -
1374 -src_test() {
1375 - # Skipped tests:
1376 - # - 7z (unpackaged Python dependency: py7zr)
1377 - # - test_unrar (unpackaged Python dependency: unrardll)
1378 - #
1379 - # Note that we currently have a hack to skip one part of test_qt!
1380 - # See PATCHES for more.
1381 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
1382 - --exclude-test-name 7z \
1383 - --exclude-test-name test_searching \
1384 - --exclude-test-name test_unrar || die
1385 -}
1386 -
1387 -src_install() {
1388 - # calibre works with python 3, so remove the python 2 constraint
1389 - export CALIBRE_PY3_PORT=1
1390 -
1391 - # Bypass kbuildsycoca and update-mime-database in order to
1392 - # avoid sandbox violations if xdg-mime tries to call them.
1393 - mkdir "${T}/bin" || die
1394 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
1395 - #!${BASH}
1396 - echo $0 : $@
1397 - exit 0
1398 - EOF
1399 -
1400 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1401 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1402 -
1403 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
1404 -
1405 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
1406 - # violation with kbuildsycoca as in bug #287067, comment #13.
1407 - export -n DISPLAY
1408 -
1409 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
1410 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
1411 - # return _parse_localename(localename)
1412 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
1413 - # raise ValueError, 'unknown locale: %s' % localename
1414 - #ValueError: unknown locale: 46
1415 - export -n LANG LANGUAGE ${!LC_*}
1416 - export LC_ALL=C.utf8 #709682
1417 -
1418 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
1419 - # variables to point to our fake temporary $HOME.
1420 - export HOME="${T}/fake_homedir"
1421 - export XDG_CONFIG_HOME="${HOME}/.config"
1422 - export XDG_DATA_HOME="${HOME}/.local/share"
1423 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
1424 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
1425 -
1426 - tc-export CC CXX
1427 - # Bug #334243 - respect LDFLAGS when building extensions
1428 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
1429 - local libdir=$(get_libdir)
1430 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
1431 -
1432 - addpredict /dev/dri #665310
1433 -
1434 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
1435 - "${PYTHON}" setup.py install \
1436 - --root="${D}" \
1437 - --prefix="${EPREFIX}/usr" \
1438 - --libdir="${EPREFIX}/usr/${libdir}" \
1439 - --staging-root="${ED}/usr" \
1440 - --staging-libdir="${ED}/usr/${libdir}" || die
1441 -
1442 - find "${ED}"/usr/share -type d -empty -delete
1443 -
1444 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
1445 - local x
1446 - for x in * ; do
1447 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
1448 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
1449 - done
1450 -
1451 - einfo "Converting python shebangs"
1452 - python_fix_shebang --force "${ED}"
1453 -
1454 - einfo "Compiling python modules"
1455 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
1456 -
1457 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
1458 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
1459 -}
1460 -
1461 -pkg_preinst() {
1462 - # Indentify stray directories from upstream's "Binary install"
1463 - # method (see bug 622728).
1464 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
1465 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
1466 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
1467 -}
1468 -
1469 -pkg_postinst() {
1470 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
1471 - local x
1472 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
1473 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
1474 - elog "Purging '${x}'"
1475 - rm -rf "${x}"
1476 - fi
1477 - done
1478 - xdg_desktop_database_update
1479 - xdg_mimeinfo_database_update
1480 - xdg_icon_cache_update
1481 -}
1482 -
1483 -pkg_postrm() {
1484 - xdg_desktop_database_update
1485 - xdg_mimeinfo_database_update
1486 - xdg_icon_cache_update
1487 -}
1488
1489 diff --git a/app-text/calibre/calibre-5.33.0.ebuild b/app-text/calibre/calibre-5.33.0.ebuild
1490 deleted file mode 100644
1491 index 7b6a8c3a07b4..000000000000
1492 --- a/app-text/calibre/calibre-5.33.0.ebuild
1493 +++ /dev/null
1494 @@ -1,315 +0,0 @@
1495 -# Copyright 1999-2021 Gentoo Authors
1496 -# Distributed under the terms of the GNU General Public License v2
1497 -
1498 -EAPI=8
1499 -
1500 -PYTHON_COMPAT=( python3_{8..9} )
1501 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
1502 -
1503 -inherit toolchain-funcs python-single-r1 xdg-utils
1504 -
1505 -DESCRIPTION="Ebook management application"
1506 -HOMEPAGE="https://calibre-ebook.com/"
1507 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
1508 -
1509 -LICENSE="
1510 - GPL-3+
1511 - GPL-3
1512 - GPL-2+
1513 - GPL-2
1514 - GPL-1+
1515 - LGPL-3+
1516 - LGPL-2.1+
1517 - LGPL-2.1
1518 - BSD
1519 - MIT
1520 - Old-MIT
1521 - Apache-2.0
1522 - public-domain
1523 - || ( Artistic GPL-1+ )
1524 - CC-BY-3.0
1525 - OFL-1.1
1526 - PSF-2
1527 -"
1528 -KEYWORDS="~amd64 ~arm ~x86"
1529 -SLOT="0"
1530 -IUSE="ios +udisks"
1531 -
1532 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
1533 -
1534 -COMMON_DEPEND="${PYTHON_DEPS}
1535 - >=app-text/hunspell-1.7:=
1536 - >=app-text/podofo-0.9.6_pre20171027:=
1537 - >=app-text/poppler-0.26.5[qt5]
1538 - dev-libs/glib:2=
1539 - dev-libs/hyphen:=
1540 - >=dev-libs/icu-57.1:=
1541 - dev-libs/libinput:=
1542 - >=dev-libs/dbus-glib-0.106
1543 - dev-libs/snowball-stemmer:=
1544 - >=sys-apps/dbus-1.10.8
1545 - $(python_gen_cond_dep '
1546 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
1547 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
1548 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
1549 - dev-python/cchardet[${PYTHON_USEDEP}]
1550 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
1551 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
1552 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
1553 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
1554 - dev-python/dnspython[${PYTHON_USEDEP}]
1555 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
1556 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
1557 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
1558 - dev-python/jeepney[${PYTHON_USEDEP}]
1559 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
1560 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
1561 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
1562 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
1563 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
1564 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
1565 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
1566 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
1567 - dev-python/pycryptodome[${PYTHON_USEDEP}]
1568 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
1569 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
1570 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
1571 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
1572 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
1573 - dev-python/regex[${PYTHON_USEDEP}]
1574 - dev-python/zeroconf[${PYTHON_USEDEP}]
1575 - ')
1576 - dev-qt/qtcore:5=
1577 - dev-qt/qtdbus:5=
1578 - dev-qt/qtgui:5=[jpeg]
1579 - >=dev-qt/qtwebengine-5.12
1580 - dev-qt/qtwidgets:5=
1581 - dev-util/desktop-file-utils
1582 - dev-util/gtk-update-icon-cache
1583 - media-fonts/liberation-fonts
1584 - media-libs/fontconfig:=
1585 - >=media-libs/freetype-2:=
1586 - >=media-libs/libmtp-1.1.11:=
1587 - >=media-libs/libwmf-0.2.8
1588 - >=media-gfx/optipng-0.7.6
1589 - >=sys-libs/zlib-1.2.11:=
1590 - virtual/libusb:1=
1591 - x11-libs/libxkbcommon:=
1592 - x11-libs/libX11:=
1593 - x11-libs/libXext:=
1594 - x11-libs/libXrender:=
1595 - x11-misc/shared-mime-info
1596 - >=x11-misc/xdg-utils-1.0.2-r2
1597 - ios? (
1598 - >=app-pda/usbmuxd-1.0.8
1599 - >=app-pda/libimobiledevice-1.2.0
1600 - )
1601 - udisks? ( virtual/libudev )"
1602 -RDEPEND="${COMMON_DEPEND}
1603 - udisks? ( sys-fs/udisks:2 )"
1604 -DEPEND="${COMMON_DEPEND}"
1605 -BDEPEND="$(python_gen_cond_dep '
1606 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
1607 - >=dev-python/sip-5[${PYTHON_USEDEP}]
1608 - ')
1609 - >=virtual/podofo-build-0.9.6_pre20171027
1610 - virtual/pkgconfig"
1611 -
1612 -PATCHES=(
1613 - # Don't prompt the user for updates - they've installed via
1614 - # an ebuild.
1615 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
1616 -
1617 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
1618 - # We don't (yet?) package libjxr and it seems to be dead upstream
1619 - # (last commit in 2017)
1620 - "${FILESDIR}/${PN}-5.31.0-jxr-test.patch"
1621 -
1622 - # TODO:
1623 - # test_qt tries to load a bunch of images using Qt and it currently fails
1624 - # due to some presumably missing dependencies. This is important and
1625 - # we need to look into it, but at time of writing, none of the tests
1626 - # are even bring run, so I'd like to return to this later.
1627 - # We don't want to skip test_qt entirely, so just skip this particular
1628 - # assert for now.
1629 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
1630 -)
1631 -
1632 -pkg_pretend() {
1633 - if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
1634 - eerror "Calibre cannot be built with this version of gcc."
1635 - eerror "You need at least gcc-6.0"
1636 - die "Your C compiler is too old for this package."
1637 - fi
1638 -}
1639 -
1640 -src_prepare() {
1641 - default
1642 -
1643 - # Warning:
1644 - #
1645 - # While it might be rather tempting to add yet another sed here,
1646 - # please don't. There have been several bugs in Gentoo's packaging
1647 - # of calibre from seds-which-become-stale. Please consider
1648 - # creating a patch instead, but in any case, run the test suite
1649 - # and ensure it passes.
1650 - #
1651 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
1652 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
1653 - # contributor. Or just ask them.
1654 -
1655 - # Fix outdated version constant.
1656 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
1657 - # -i src/calibre/constants.py || \
1658 - # die "sed failed to patch constants.py"
1659 -
1660 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
1661 - # calls xdg-* (bug #258938).
1662 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
1663 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1664 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
1665 - -e "s|, PreserveMIMEDefaults():|:|" \
1666 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
1667 - -e "s|cmd\[2\]|cmd[4]|" \
1668 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
1669 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
1670 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
1671 -
1672 - # Disable unnecessary privilege dropping for bug #287067.
1673 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
1674 - -i setup/install.py || die "sed failed to patch install.py"
1675 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
1676 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
1677 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
1678 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
1679 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
1680 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
1681 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
1682 - -i setup/build.py || die "sed failed to patch build.py"
1683 -}
1684 -
1685 -src_compile() {
1686 - # TODO: get qmake called by setup.py to respect CC and CXX too
1687 - tc-export CC CXX
1688 -
1689 - # bug 821871
1690 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
1691 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
1692 -
1693 - PATH="${T}/bin:${PATH}" ${EPYTHON} setup.py build || die
1694 -}
1695 -
1696 -src_test() {
1697 - # Skipped tests:
1698 - # - 7z (unpackaged Python dependency: py7zr)
1699 - # - test_unrar (unpackaged Python dependency: unrardll)
1700 - #
1701 - # Note that we currently have a hack to skip one part of test_qt!
1702 - # See PATCHES for more.
1703 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
1704 - --exclude-test-name 7z \
1705 - --exclude-test-name test_searching \
1706 - --exclude-test-name test_unrar || die
1707 -}
1708 -
1709 -src_install() {
1710 - # calibre works with python 3, so remove the python 2 constraint
1711 - export CALIBRE_PY3_PORT=1
1712 -
1713 - # Bypass kbuildsycoca and update-mime-database in order to
1714 - # avoid sandbox violations if xdg-mime tries to call them.
1715 - mkdir "${T}/bin" || die
1716 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
1717 - #!${BASH}
1718 - echo $0 : $@
1719 - exit 0
1720 - EOF
1721 -
1722 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1723 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
1724 -
1725 - export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
1726 -
1727 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
1728 - # violation with kbuildsycoca as in bug #287067, comment #13.
1729 - export -n DISPLAY
1730 -
1731 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
1732 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
1733 - # return _parse_localename(localename)
1734 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
1735 - # raise ValueError, 'unknown locale: %s' % localename
1736 - #ValueError: unknown locale: 46
1737 - export -n LANG LANGUAGE ${!LC_*}
1738 - export LC_ALL=C.utf8 #709682
1739 -
1740 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
1741 - # variables to point to our fake temporary $HOME.
1742 - export HOME="${T}/fake_homedir"
1743 - export XDG_CONFIG_HOME="${HOME}/.config"
1744 - export XDG_DATA_HOME="${HOME}/.local/share"
1745 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
1746 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
1747 -
1748 - tc-export CC CXX
1749 - # Bug #334243 - respect LDFLAGS when building extensions
1750 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
1751 - local libdir=$(get_libdir)
1752 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
1753 -
1754 - addpredict /dev/dri #665310
1755 -
1756 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
1757 - "${PYTHON}" setup.py install \
1758 - --root="${D}" \
1759 - --prefix="${EPREFIX}/usr" \
1760 - --libdir="${EPREFIX}/usr/${libdir}" \
1761 - --staging-root="${ED}/usr" \
1762 - --staging-libdir="${ED}/usr/${libdir}" || die
1763 -
1764 - find "${ED}"/usr/share -type d -empty -delete
1765 -
1766 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
1767 - local x
1768 - for x in * ; do
1769 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
1770 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
1771 - done
1772 -
1773 - einfo "Converting python shebangs"
1774 - python_fix_shebang --force "${ED}"
1775 -
1776 - einfo "Compiling python modules"
1777 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
1778 -
1779 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
1780 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
1781 -}
1782 -
1783 -pkg_preinst() {
1784 - # Indentify stray directories from upstream's "Binary install"
1785 - # method (see bug 622728).
1786 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
1787 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
1788 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
1789 -}
1790 -
1791 -pkg_postinst() {
1792 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
1793 - local x
1794 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
1795 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
1796 - elog "Purging '${x}'"
1797 - rm -rf "${x}"
1798 - fi
1799 - done
1800 - xdg_desktop_database_update
1801 - xdg_mimeinfo_database_update
1802 - xdg_icon_cache_update
1803 -}
1804 -
1805 -pkg_postrm() {
1806 - xdg_desktop_database_update
1807 - xdg_mimeinfo_database_update
1808 - xdg_icon_cache_update
1809 -}