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: Thu, 19 May 2022 02:36:54
Message-Id: 1652927340.c5e02dd3abb0298d0d41df68385b11c28f9cdd35.zmedico@gentoo
1 commit: c5e02dd3abb0298d0d41df68385b11c28f9cdd35
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 19 02:29:00 2022 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Thu May 19 02:29:00 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5e02dd3
7
8 app-text/calibre: drop 5.39.1, 5.40.0, 5.41.0
9
10 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
11
12 app-text/calibre/Manifest | 3 -
13 app-text/calibre/calibre-5.39.1.ebuild | 307 ---------------------------------
14 app-text/calibre/calibre-5.40.0.ebuild | 307 ---------------------------------
15 app-text/calibre/calibre-5.41.0.ebuild | 307 ---------------------------------
16 4 files changed, 924 deletions(-)
17
18 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
19 index f67e5b0f97e6..91f1caca0695 100644
20 --- a/app-text/calibre/Manifest
21 +++ b/app-text/calibre/Manifest
22 @@ -1,6 +1,3 @@
23 DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbcffbf16248081ccf0ab313420fe3898954da71e0796b3d6c44e93c636113221f95fa6affc6be97bf41f4086a909b2849f9 SHA512 eb19e6bb328f60eb4af2c38d54c3d2a09989d41d71d27de10ab5ae443af902c3c12fc70042d4735dd785573cb63bb7d7a10ae5f7ed72afc1e1a9c6aacaf64aec
24 DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae
25 -DIST calibre-5.39.1.tar.xz 38375212 BLAKE2B c9205b84180cdf3e98ca30729815f0c3f6b490e1df855119b3032689417b4218d26ce4c6f56d93d040fd5b88924fc432102c00af3286f85b7d5a72a536ab1ece SHA512 47a3be38a24b9e690102108abd1f2385d792721adec637f6de1cc8504df8cc0e3577786add3f48a10c2bc995320d65370d002afaea6ea13b6131b8b6767f27fa
26 -DIST calibre-5.40.0.tar.xz 38395684 BLAKE2B ff5289d9042dd114a41b90a0b91a84cba30a79d6778d0b59d2115d03dca93151ce4cd0de5fbe8cc94eb89c6cbaf8268d54680d4a1981be33f94bf332b7afb243 SHA512 06d973a6945cdca6b9eb252c656a4fe5dab15201e4c77f81a1174bdfceeaed1d64d50bde5ea7cfb4e462bb7e32d30ae0bfe166c80b2a3b765641da574fd8ed46
27 -DIST calibre-5.41.0.tar.xz 38461752 BLAKE2B e6ea7d1c838492ea23d1f630de134d773c09f5080bd4575065c4379a52170f3bb3ed7ee6ea53af413f931ffc68a25abf06139d60a333e2888149e9080014a5dc SHA512 f2d43ea085ce9d55ae619302d1e53ba6f3ef8a850903878937605eec322e6ef412075e53dd92608f6829a91d706bdd3f3f9f9fd21866f3f73cb1b5d8e0639c10
28 DIST calibre-5.42.0.tar.xz 38523536 BLAKE2B 81d8477fbbaeedbf589c3c25b16925f6fe383c74d9ad17d0036f886304c9ce1f807fea6463ef0dc345a07de69438785faca6ef7337e5ff1e7d5684b4d0ed7cdd SHA512 dac197d0a6f36f8ebb56720214df355bfc2625ecf55992b824e3409e7273db12fabfd54d2f602f950761efc717e52f872f5f2c2078770abbc887ef30cc64bbe8
29
30 diff --git a/app-text/calibre/calibre-5.39.1.ebuild b/app-text/calibre/calibre-5.39.1.ebuild
31 deleted file mode 100644
32 index 9f952093e1f7..000000000000
33 --- a/app-text/calibre/calibre-5.39.1.ebuild
34 +++ /dev/null
35 @@ -1,307 +0,0 @@
36 -# Copyright 1999-2022 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=8
40 -
41 -PYTHON_COMPAT=( python3_{8..9} )
42 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
43 -
44 -inherit toolchain-funcs python-single-r1 qmake-utils xdg-utils
45 -
46 -DESCRIPTION="Ebook management application"
47 -HOMEPAGE="https://calibre-ebook.com/"
48 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
49 -
50 -LICENSE="
51 - GPL-3+
52 - GPL-3
53 - GPL-2+
54 - GPL-2
55 - GPL-1+
56 - LGPL-3+
57 - LGPL-2.1+
58 - LGPL-2.1
59 - BSD
60 - MIT
61 - Old-MIT
62 - Apache-2.0
63 - public-domain
64 - || ( Artistic GPL-1+ )
65 - CC-BY-3.0
66 - OFL-1.1
67 - PSF-2
68 -"
69 -KEYWORDS="~amd64 ~arm ~x86"
70 -SLOT="0"
71 -IUSE="ios +udisks"
72 -
73 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
74 -
75 -COMMON_DEPEND="${PYTHON_DEPS}
76 - >=app-text/hunspell-1.7:=
77 - >=app-text/podofo-0.9.6_pre20171027:=
78 - >=app-text/poppler-0.26.5[qt5]
79 - dev-libs/glib:2=
80 - dev-libs/hyphen:=
81 - >=dev-libs/icu-57.1:=
82 - dev-libs/libinput:=
83 - >=dev-libs/dbus-glib-0.106
84 - dev-libs/snowball-stemmer:=
85 - >=sys-apps/dbus-1.10.8
86 - $(python_gen_cond_dep '
87 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
88 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
89 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
90 - dev-python/cchardet[${PYTHON_USEDEP}]
91 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
92 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
93 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
94 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
95 - dev-python/dnspython[${PYTHON_USEDEP}]
96 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
97 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
98 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
99 - dev-python/jeepney[${PYTHON_USEDEP}]
100 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
101 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
102 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
103 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
104 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
105 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
106 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
107 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
108 - dev-python/pycryptodome[${PYTHON_USEDEP}]
109 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
110 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
111 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
112 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
113 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
114 - dev-python/regex[${PYTHON_USEDEP}]
115 - dev-python/zeroconf[${PYTHON_USEDEP}]
116 - ')
117 - dev-qt/qtcore:5=
118 - dev-qt/qtdbus:5=
119 - dev-qt/qtgui:5=[jpeg]
120 - dev-qt/qtwidgets:5=
121 - dev-util/desktop-file-utils
122 - dev-util/gtk-update-icon-cache
123 - media-fonts/liberation-fonts
124 - media-libs/fontconfig:=
125 - >=media-libs/freetype-2:=
126 - >=media-libs/libmtp-1.1.11:=
127 - >=media-libs/libwmf-0.2.8
128 - >=media-gfx/optipng-0.7.6
129 - >=sys-libs/zlib-1.2.11:=
130 - virtual/libusb:1=
131 - x11-libs/libxkbcommon:=
132 - x11-libs/libX11:=
133 - x11-libs/libXext:=
134 - x11-libs/libXrender:=
135 - x11-misc/shared-mime-info
136 - >=x11-misc/xdg-utils-1.0.2-r2
137 - ios? (
138 - >=app-pda/usbmuxd-1.0.8
139 - >=app-pda/libimobiledevice-1.2.0
140 - )
141 - udisks? ( virtual/libudev )"
142 -RDEPEND="${COMMON_DEPEND}
143 - udisks? ( sys-fs/udisks:2 )"
144 -DEPEND="${COMMON_DEPEND}"
145 -BDEPEND="$(python_gen_cond_dep '
146 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
147 - >=dev-python/sip-5[${PYTHON_USEDEP}]
148 - ')
149 - >=virtual/podofo-build-0.9.6_pre20171027
150 - virtual/pkgconfig"
151 -
152 -PATCHES=(
153 - # Don't prompt the user for updates - they've installed via
154 - # an ebuild.
155 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
156 -
157 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
158 - # We don't (yet?) package libjxr and it seems to be dead upstream
159 - # (last commit in 2017)
160 - "${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
161 -
162 - # TODO:
163 - # test_qt tries to load a bunch of images using Qt and it currently fails
164 - # due to some presumably missing dependencies. This is important and
165 - # we need to look into it, but at time of writing, none of the tests
166 - # are even bring run, so I'd like to return to this later.
167 - # We don't want to skip test_qt entirely, so just skip this particular
168 - # assert for now.
169 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
170 -)
171 -
172 -src_prepare() {
173 - default
174 -
175 - # Warning:
176 - #
177 - # While it might be rather tempting to add yet another sed here,
178 - # please don't. There have been several bugs in Gentoo's packaging
179 - # of calibre from seds-which-become-stale. Please consider
180 - # creating a patch instead, but in any case, run the test suite
181 - # and ensure it passes.
182 - #
183 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
184 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
185 - # contributor. Or just ask them.
186 -
187 - # Fix outdated version constant.
188 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
189 - # -i src/calibre/constants.py || \
190 - # die "sed failed to patch constants.py"
191 -
192 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
193 - # calls xdg-* (bug #258938).
194 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
195 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
196 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
197 - -e "s|, PreserveMIMEDefaults():|:|" \
198 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
199 - -e "s|cmd\[2\]|cmd[4]|" \
200 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
201 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
202 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
203 -
204 - # Disable unnecessary privilege dropping for bug #287067.
205 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
206 - -i setup/install.py || die "sed failed to patch install.py"
207 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
208 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
209 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
210 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
211 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
212 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
213 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
214 - -i setup/build.py || die "sed failed to patch build.py"
215 -}
216 -
217 -src_compile() {
218 - # TODO: get qmake called by setup.py to respect CC and CXX too
219 - tc-export CC CXX
220 -
221 - # bug 821871
222 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
223 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
224 -
225 - PATH="${T}/bin:$(qt5_get_bindir):${PATH}" ${EPYTHON} setup.py build || die
226 -}
227 -
228 -src_test() {
229 - # Skipped tests:
230 - # - 7z (unpackaged Python dependency: py7zr)
231 - # - test_unrar (unpackaged Python dependency: unrardll)
232 - #
233 - # Note that we currently have a hack to skip one part of test_qt!
234 - # See PATCHES for more.
235 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
236 - --exclude-test-name 7z \
237 - --exclude-test-name test_mem_leaks \
238 - --exclude-test-name test_searching \
239 - --exclude-test-name test_unrar || die
240 -}
241 -
242 -src_install() {
243 - # calibre works with python 3, so remove the python 2 constraint
244 - export CALIBRE_PY3_PORT=1
245 -
246 - # Bypass kbuildsycoca and update-mime-database in order to
247 - # avoid sandbox violations if xdg-mime tries to call them.
248 - mkdir "${T}/bin" || die
249 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
250 - #!${BASH}
251 - echo $0 : $@
252 - exit 0
253 - EOF
254 -
255 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
256 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
257 -
258 - export QMAKE="$(qt5_get_bindir)/qmake"
259 -
260 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
261 - # violation with kbuildsycoca as in bug #287067, comment #13.
262 - export -n DISPLAY
263 -
264 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
265 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
266 - # return _parse_localename(localename)
267 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
268 - # raise ValueError, 'unknown locale: %s' % localename
269 - #ValueError: unknown locale: 46
270 - export -n LANG LANGUAGE ${!LC_*}
271 - export LC_ALL=C.utf8 #709682
272 -
273 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
274 - # variables to point to our fake temporary $HOME.
275 - export HOME="${T}/fake_homedir"
276 - export XDG_CONFIG_HOME="${HOME}/.config"
277 - export XDG_DATA_HOME="${HOME}/.local/share"
278 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
279 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
280 -
281 - tc-export CC CXX
282 - # Bug #334243 - respect LDFLAGS when building extensions
283 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
284 - local libdir=$(get_libdir)
285 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
286 -
287 - addpredict /dev/dri #665310
288 -
289 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
290 - "${PYTHON}" setup.py install \
291 - --root="${D}" \
292 - --prefix="${EPREFIX}/usr" \
293 - --libdir="${EPREFIX}/usr/${libdir}" \
294 - --staging-root="${ED}/usr" \
295 - --staging-libdir="${ED}/usr/${libdir}" || die
296 -
297 - find "${ED}"/usr/share -type d -empty -delete
298 -
299 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
300 - local x
301 - for x in * ; do
302 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
303 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
304 - done
305 -
306 - einfo "Converting python shebangs"
307 - python_fix_shebang --force "${ED}"
308 -
309 - einfo "Compiling python modules"
310 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
311 -
312 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
313 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
314 -}
315 -
316 -pkg_preinst() {
317 - # Indentify stray directories from upstream's "Binary install"
318 - # method (see bug 622728).
319 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
320 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
321 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
322 -}
323 -
324 -pkg_postinst() {
325 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
326 - local x
327 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
328 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
329 - elog "Purging '${x}'"
330 - rm -rf "${x}"
331 - fi
332 - done
333 - xdg_desktop_database_update
334 - xdg_mimeinfo_database_update
335 - xdg_icon_cache_update
336 -}
337 -
338 -pkg_postrm() {
339 - xdg_desktop_database_update
340 - xdg_mimeinfo_database_update
341 - xdg_icon_cache_update
342 -}
343
344 diff --git a/app-text/calibre/calibre-5.40.0.ebuild b/app-text/calibre/calibre-5.40.0.ebuild
345 deleted file mode 100644
346 index 9f952093e1f7..000000000000
347 --- a/app-text/calibre/calibre-5.40.0.ebuild
348 +++ /dev/null
349 @@ -1,307 +0,0 @@
350 -# Copyright 1999-2022 Gentoo Authors
351 -# Distributed under the terms of the GNU General Public License v2
352 -
353 -EAPI=8
354 -
355 -PYTHON_COMPAT=( python3_{8..9} )
356 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
357 -
358 -inherit toolchain-funcs python-single-r1 qmake-utils xdg-utils
359 -
360 -DESCRIPTION="Ebook management application"
361 -HOMEPAGE="https://calibre-ebook.com/"
362 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
363 -
364 -LICENSE="
365 - GPL-3+
366 - GPL-3
367 - GPL-2+
368 - GPL-2
369 - GPL-1+
370 - LGPL-3+
371 - LGPL-2.1+
372 - LGPL-2.1
373 - BSD
374 - MIT
375 - Old-MIT
376 - Apache-2.0
377 - public-domain
378 - || ( Artistic GPL-1+ )
379 - CC-BY-3.0
380 - OFL-1.1
381 - PSF-2
382 -"
383 -KEYWORDS="~amd64 ~arm ~x86"
384 -SLOT="0"
385 -IUSE="ios +udisks"
386 -
387 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
388 -
389 -COMMON_DEPEND="${PYTHON_DEPS}
390 - >=app-text/hunspell-1.7:=
391 - >=app-text/podofo-0.9.6_pre20171027:=
392 - >=app-text/poppler-0.26.5[qt5]
393 - dev-libs/glib:2=
394 - dev-libs/hyphen:=
395 - >=dev-libs/icu-57.1:=
396 - dev-libs/libinput:=
397 - >=dev-libs/dbus-glib-0.106
398 - dev-libs/snowball-stemmer:=
399 - >=sys-apps/dbus-1.10.8
400 - $(python_gen_cond_dep '
401 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
402 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
403 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
404 - dev-python/cchardet[${PYTHON_USEDEP}]
405 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
406 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
407 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
408 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
409 - dev-python/dnspython[${PYTHON_USEDEP}]
410 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
411 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
412 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
413 - dev-python/jeepney[${PYTHON_USEDEP}]
414 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
415 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
416 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
417 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
418 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
419 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
420 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
421 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
422 - dev-python/pycryptodome[${PYTHON_USEDEP}]
423 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
424 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
425 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
426 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
427 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
428 - dev-python/regex[${PYTHON_USEDEP}]
429 - dev-python/zeroconf[${PYTHON_USEDEP}]
430 - ')
431 - dev-qt/qtcore:5=
432 - dev-qt/qtdbus:5=
433 - dev-qt/qtgui:5=[jpeg]
434 - dev-qt/qtwidgets:5=
435 - dev-util/desktop-file-utils
436 - dev-util/gtk-update-icon-cache
437 - media-fonts/liberation-fonts
438 - media-libs/fontconfig:=
439 - >=media-libs/freetype-2:=
440 - >=media-libs/libmtp-1.1.11:=
441 - >=media-libs/libwmf-0.2.8
442 - >=media-gfx/optipng-0.7.6
443 - >=sys-libs/zlib-1.2.11:=
444 - virtual/libusb:1=
445 - x11-libs/libxkbcommon:=
446 - x11-libs/libX11:=
447 - x11-libs/libXext:=
448 - x11-libs/libXrender:=
449 - x11-misc/shared-mime-info
450 - >=x11-misc/xdg-utils-1.0.2-r2
451 - ios? (
452 - >=app-pda/usbmuxd-1.0.8
453 - >=app-pda/libimobiledevice-1.2.0
454 - )
455 - udisks? ( virtual/libudev )"
456 -RDEPEND="${COMMON_DEPEND}
457 - udisks? ( sys-fs/udisks:2 )"
458 -DEPEND="${COMMON_DEPEND}"
459 -BDEPEND="$(python_gen_cond_dep '
460 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
461 - >=dev-python/sip-5[${PYTHON_USEDEP}]
462 - ')
463 - >=virtual/podofo-build-0.9.6_pre20171027
464 - virtual/pkgconfig"
465 -
466 -PATCHES=(
467 - # Don't prompt the user for updates - they've installed via
468 - # an ebuild.
469 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
470 -
471 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
472 - # We don't (yet?) package libjxr and it seems to be dead upstream
473 - # (last commit in 2017)
474 - "${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
475 -
476 - # TODO:
477 - # test_qt tries to load a bunch of images using Qt and it currently fails
478 - # due to some presumably missing dependencies. This is important and
479 - # we need to look into it, but at time of writing, none of the tests
480 - # are even bring run, so I'd like to return to this later.
481 - # We don't want to skip test_qt entirely, so just skip this particular
482 - # assert for now.
483 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
484 -)
485 -
486 -src_prepare() {
487 - default
488 -
489 - # Warning:
490 - #
491 - # While it might be rather tempting to add yet another sed here,
492 - # please don't. There have been several bugs in Gentoo's packaging
493 - # of calibre from seds-which-become-stale. Please consider
494 - # creating a patch instead, but in any case, run the test suite
495 - # and ensure it passes.
496 - #
497 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
498 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
499 - # contributor. Or just ask them.
500 -
501 - # Fix outdated version constant.
502 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
503 - # -i src/calibre/constants.py || \
504 - # die "sed failed to patch constants.py"
505 -
506 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
507 - # calls xdg-* (bug #258938).
508 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
509 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
510 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
511 - -e "s|, PreserveMIMEDefaults():|:|" \
512 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
513 - -e "s|cmd\[2\]|cmd[4]|" \
514 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
515 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
516 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
517 -
518 - # Disable unnecessary privilege dropping for bug #287067.
519 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
520 - -i setup/install.py || die "sed failed to patch install.py"
521 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
522 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
523 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
524 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
525 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
526 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
527 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
528 - -i setup/build.py || die "sed failed to patch build.py"
529 -}
530 -
531 -src_compile() {
532 - # TODO: get qmake called by setup.py to respect CC and CXX too
533 - tc-export CC CXX
534 -
535 - # bug 821871
536 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
537 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
538 -
539 - PATH="${T}/bin:$(qt5_get_bindir):${PATH}" ${EPYTHON} setup.py build || die
540 -}
541 -
542 -src_test() {
543 - # Skipped tests:
544 - # - 7z (unpackaged Python dependency: py7zr)
545 - # - test_unrar (unpackaged Python dependency: unrardll)
546 - #
547 - # Note that we currently have a hack to skip one part of test_qt!
548 - # See PATCHES for more.
549 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
550 - --exclude-test-name 7z \
551 - --exclude-test-name test_mem_leaks \
552 - --exclude-test-name test_searching \
553 - --exclude-test-name test_unrar || die
554 -}
555 -
556 -src_install() {
557 - # calibre works with python 3, so remove the python 2 constraint
558 - export CALIBRE_PY3_PORT=1
559 -
560 - # Bypass kbuildsycoca and update-mime-database in order to
561 - # avoid sandbox violations if xdg-mime tries to call them.
562 - mkdir "${T}/bin" || die
563 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
564 - #!${BASH}
565 - echo $0 : $@
566 - exit 0
567 - EOF
568 -
569 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
570 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
571 -
572 - export QMAKE="$(qt5_get_bindir)/qmake"
573 -
574 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
575 - # violation with kbuildsycoca as in bug #287067, comment #13.
576 - export -n DISPLAY
577 -
578 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
579 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
580 - # return _parse_localename(localename)
581 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
582 - # raise ValueError, 'unknown locale: %s' % localename
583 - #ValueError: unknown locale: 46
584 - export -n LANG LANGUAGE ${!LC_*}
585 - export LC_ALL=C.utf8 #709682
586 -
587 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
588 - # variables to point to our fake temporary $HOME.
589 - export HOME="${T}/fake_homedir"
590 - export XDG_CONFIG_HOME="${HOME}/.config"
591 - export XDG_DATA_HOME="${HOME}/.local/share"
592 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
593 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
594 -
595 - tc-export CC CXX
596 - # Bug #334243 - respect LDFLAGS when building extensions
597 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
598 - local libdir=$(get_libdir)
599 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
600 -
601 - addpredict /dev/dri #665310
602 -
603 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
604 - "${PYTHON}" setup.py install \
605 - --root="${D}" \
606 - --prefix="${EPREFIX}/usr" \
607 - --libdir="${EPREFIX}/usr/${libdir}" \
608 - --staging-root="${ED}/usr" \
609 - --staging-libdir="${ED}/usr/${libdir}" || die
610 -
611 - find "${ED}"/usr/share -type d -empty -delete
612 -
613 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
614 - local x
615 - for x in * ; do
616 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
617 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
618 - done
619 -
620 - einfo "Converting python shebangs"
621 - python_fix_shebang --force "${ED}"
622 -
623 - einfo "Compiling python modules"
624 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
625 -
626 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
627 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
628 -}
629 -
630 -pkg_preinst() {
631 - # Indentify stray directories from upstream's "Binary install"
632 - # method (see bug 622728).
633 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
634 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
635 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
636 -}
637 -
638 -pkg_postinst() {
639 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
640 - local x
641 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
642 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
643 - elog "Purging '${x}'"
644 - rm -rf "${x}"
645 - fi
646 - done
647 - xdg_desktop_database_update
648 - xdg_mimeinfo_database_update
649 - xdg_icon_cache_update
650 -}
651 -
652 -pkg_postrm() {
653 - xdg_desktop_database_update
654 - xdg_mimeinfo_database_update
655 - xdg_icon_cache_update
656 -}
657
658 diff --git a/app-text/calibre/calibre-5.41.0.ebuild b/app-text/calibre/calibre-5.41.0.ebuild
659 deleted file mode 100644
660 index 9f952093e1f7..000000000000
661 --- a/app-text/calibre/calibre-5.41.0.ebuild
662 +++ /dev/null
663 @@ -1,307 +0,0 @@
664 -# Copyright 1999-2022 Gentoo Authors
665 -# Distributed under the terms of the GNU General Public License v2
666 -
667 -EAPI=8
668 -
669 -PYTHON_COMPAT=( python3_{8..9} )
670 -PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
671 -
672 -inherit toolchain-funcs python-single-r1 qmake-utils xdg-utils
673 -
674 -DESCRIPTION="Ebook management application"
675 -HOMEPAGE="https://calibre-ebook.com/"
676 -SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
677 -
678 -LICENSE="
679 - GPL-3+
680 - GPL-3
681 - GPL-2+
682 - GPL-2
683 - GPL-1+
684 - LGPL-3+
685 - LGPL-2.1+
686 - LGPL-2.1
687 - BSD
688 - MIT
689 - Old-MIT
690 - Apache-2.0
691 - public-domain
692 - || ( Artistic GPL-1+ )
693 - CC-BY-3.0
694 - OFL-1.1
695 - PSF-2
696 -"
697 -KEYWORDS="~amd64 ~arm ~x86"
698 -SLOT="0"
699 -IUSE="ios +udisks"
700 -
701 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
702 -
703 -COMMON_DEPEND="${PYTHON_DEPS}
704 - >=app-text/hunspell-1.7:=
705 - >=app-text/podofo-0.9.6_pre20171027:=
706 - >=app-text/poppler-0.26.5[qt5]
707 - dev-libs/glib:2=
708 - dev-libs/hyphen:=
709 - >=dev-libs/icu-57.1:=
710 - dev-libs/libinput:=
711 - >=dev-libs/dbus-glib-0.106
712 - dev-libs/snowball-stemmer:=
713 - >=sys-apps/dbus-1.10.8
714 - $(python_gen_cond_dep '
715 - app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
716 - >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
717 - dev-python/beautifulsoup4[${PYTHON_USEDEP}]
718 - dev-python/cchardet[${PYTHON_USEDEP}]
719 - >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
720 - >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
721 - >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
722 - >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
723 - dev-python/dnspython[${PYTHON_USEDEP}]
724 - >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
725 - >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
726 - >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
727 - dev-python/jeepney[${PYTHON_USEDEP}]
728 - >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
729 - >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
730 - >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
731 - >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
732 - >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
733 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
734 - >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
735 - >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
736 - dev-python/pycryptodome[${PYTHON_USEDEP}]
737 - >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
738 - >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
739 - >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
740 - >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
741 - >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
742 - dev-python/regex[${PYTHON_USEDEP}]
743 - dev-python/zeroconf[${PYTHON_USEDEP}]
744 - ')
745 - dev-qt/qtcore:5=
746 - dev-qt/qtdbus:5=
747 - dev-qt/qtgui:5=[jpeg]
748 - dev-qt/qtwidgets:5=
749 - dev-util/desktop-file-utils
750 - dev-util/gtk-update-icon-cache
751 - media-fonts/liberation-fonts
752 - media-libs/fontconfig:=
753 - >=media-libs/freetype-2:=
754 - >=media-libs/libmtp-1.1.11:=
755 - >=media-libs/libwmf-0.2.8
756 - >=media-gfx/optipng-0.7.6
757 - >=sys-libs/zlib-1.2.11:=
758 - virtual/libusb:1=
759 - x11-libs/libxkbcommon:=
760 - x11-libs/libX11:=
761 - x11-libs/libXext:=
762 - x11-libs/libXrender:=
763 - x11-misc/shared-mime-info
764 - >=x11-misc/xdg-utils-1.0.2-r2
765 - ios? (
766 - >=app-pda/usbmuxd-1.0.8
767 - >=app-pda/libimobiledevice-1.2.0
768 - )
769 - udisks? ( virtual/libudev )"
770 -RDEPEND="${COMMON_DEPEND}
771 - udisks? ( sys-fs/udisks:2 )"
772 -DEPEND="${COMMON_DEPEND}"
773 -BDEPEND="$(python_gen_cond_dep '
774 - >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
775 - >=dev-python/sip-5[${PYTHON_USEDEP}]
776 - ')
777 - >=virtual/podofo-build-0.9.6_pre20171027
778 - virtual/pkgconfig"
779 -
780 -PATCHES=(
781 - # Don't prompt the user for updates - they've installed via
782 - # an ebuild.
783 - "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
784 -
785 - # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
786 - # We don't (yet?) package libjxr and it seems to be dead upstream
787 - # (last commit in 2017)
788 - "${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
789 -
790 - # TODO:
791 - # test_qt tries to load a bunch of images using Qt and it currently fails
792 - # due to some presumably missing dependencies. This is important and
793 - # we need to look into it, but at time of writing, none of the tests
794 - # are even bring run, so I'd like to return to this later.
795 - # We don't want to skip test_qt entirely, so just skip this particular
796 - # assert for now.
797 - "${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
798 -)
799 -
800 -src_prepare() {
801 - default
802 -
803 - # Warning:
804 - #
805 - # While it might be rather tempting to add yet another sed here,
806 - # please don't. There have been several bugs in Gentoo's packaging
807 - # of calibre from seds-which-become-stale. Please consider
808 - # creating a patch instead, but in any case, run the test suite
809 - # and ensure it passes.
810 - #
811 - # If in doubt about a problem, checking Fedora or Arch Linux's packaging
812 - # is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
813 - # contributor. Or just ask them.
814 -
815 - # Fix outdated version constant.
816 - #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
817 - # -i src/calibre/constants.py || \
818 - # die "sed failed to patch constants.py"
819 -
820 - # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
821 - # calls xdg-* (bug #258938).
822 - sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
823 - -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
824 - -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
825 - -e "s|, PreserveMIMEDefaults():|:|" \
826 - -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
827 - -e "s|cmd\[2\]|cmd[4]|" \
828 - -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
829 - -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
830 - -i src/calibre/linux.py || die "sed failed to patch linux.py"
831 -
832 - # Disable unnecessary privilege dropping for bug #287067.
833 - sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
834 - -i setup/install.py || die "sed failed to patch install.py"
835 - sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\
836 -\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
837 -'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
838 -'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
839 -'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
840 -'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
841 - -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
842 - -i setup/build.py || die "sed failed to patch build.py"
843 -}
844 -
845 -src_compile() {
846 - # TODO: get qmake called by setup.py to respect CC and CXX too
847 - tc-export CC CXX
848 -
849 - # bug 821871
850 - local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
851 - export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
852 -
853 - PATH="${T}/bin:$(qt5_get_bindir):${PATH}" ${EPYTHON} setup.py build || die
854 -}
855 -
856 -src_test() {
857 - # Skipped tests:
858 - # - 7z (unpackaged Python dependency: py7zr)
859 - # - test_unrar (unpackaged Python dependency: unrardll)
860 - #
861 - # Note that we currently have a hack to skip one part of test_qt!
862 - # See PATCHES for more.
863 - CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
864 - --exclude-test-name 7z \
865 - --exclude-test-name test_mem_leaks \
866 - --exclude-test-name test_searching \
867 - --exclude-test-name test_unrar || die
868 -}
869 -
870 -src_install() {
871 - # calibre works with python 3, so remove the python 2 constraint
872 - export CALIBRE_PY3_PORT=1
873 -
874 - # Bypass kbuildsycoca and update-mime-database in order to
875 - # avoid sandbox violations if xdg-mime tries to call them.
876 - mkdir "${T}/bin" || die
877 - cat - > "${T}/bin/kbuildsycoca" <<-EOF
878 - #!${BASH}
879 - echo $0 : $@
880 - exit 0
881 - EOF
882 -
883 - cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
884 - chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
885 -
886 - export QMAKE="$(qt5_get_bindir)/qmake"
887 -
888 - # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
889 - # violation with kbuildsycoca as in bug #287067, comment #13.
890 - export -n DISPLAY
891 -
892 - # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
893 - # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
894 - # return _parse_localename(localename)
895 - # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
896 - # raise ValueError, 'unknown locale: %s' % localename
897 - #ValueError: unknown locale: 46
898 - export -n LANG LANGUAGE ${!LC_*}
899 - export LC_ALL=C.utf8 #709682
900 -
901 - # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
902 - # variables to point to our fake temporary $HOME.
903 - export HOME="${T}/fake_homedir"
904 - export XDG_CONFIG_HOME="${HOME}/.config"
905 - export XDG_DATA_HOME="${HOME}/.local/share"
906 - export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
907 - mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
908 -
909 - tc-export CC CXX
910 - # Bug #334243 - respect LDFLAGS when building extensions
911 - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
912 - local libdir=$(get_libdir)
913 - [[ -n $libdir ]] || die "get_libdir returned an empty string"
914 -
915 - addpredict /dev/dri #665310
916 -
917 - PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
918 - "${PYTHON}" setup.py install \
919 - --root="${D}" \
920 - --prefix="${EPREFIX}/usr" \
921 - --libdir="${EPREFIX}/usr/${libdir}" \
922 - --staging-root="${ED}/usr" \
923 - --staging-libdir="${ED}/usr/${libdir}" || die
924 -
925 - find "${ED}"/usr/share -type d -empty -delete
926 -
927 - cd "${ED}"/usr/share/calibre/fonts/liberation || die
928 - local x
929 - for x in * ; do
930 - [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
931 - ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
932 - done
933 -
934 - einfo "Converting python shebangs"
935 - python_fix_shebang --force "${ED}"
936 -
937 - einfo "Compiling python modules"
938 - python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
939 -
940 - newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
941 - newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
942 -}
943 -
944 -pkg_preinst() {
945 - # Indentify stray directories from upstream's "Binary install"
946 - # method (see bug 622728).
947 - CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
948 - CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
949 - printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
950 -}
951 -
952 -pkg_postinst() {
953 - [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
954 - local x
955 - for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
956 - if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
957 - elog "Purging '${x}'"
958 - rm -rf "${x}"
959 - fi
960 - done
961 - xdg_desktop_database_update
962 - xdg_mimeinfo_database_update
963 - xdg_icon_cache_update
964 -}
965 -
966 -pkg_postrm() {
967 - xdg_desktop_database_update
968 - xdg_mimeinfo_database_update
969 - xdg_icon_cache_update
970 -}