1 |
commit: abfbb10eb62a9e0e38e4a9aca7d2dd377f461d8f |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 7 19:00:42 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 7 19:00:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abfbb10e |
7 |
|
8 |
app-text/calibre: Remove old versions |
9 |
|
10 |
Package-Manager: Portage-2.3.92, Repoman-2.3.20 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-text/calibre/Manifest | 2 - |
14 |
app-text/calibre/calibre-4.10.1-r2.ebuild | 274 ------------------------------ |
15 |
app-text/calibre/calibre-4.11.1.ebuild | 274 ------------------------------ |
16 |
3 files changed, 550 deletions(-) |
17 |
|
18 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
19 |
index deea0ca9660..b5bf4def9c2 100644 |
20 |
--- a/app-text/calibre/Manifest |
21 |
+++ b/app-text/calibre/Manifest |
22 |
@@ -1,5 +1,3 @@ |
23 |
-DIST calibre-4.10.1.tar.xz 37012272 BLAKE2B e5d9421ed986da8ec7d814f364702fe04bcbb76b5e08dedfadd7164c81943cdfe6f012042e82a4715e3ccda284efdf44340af0bde9d03cbc7c22cbcf10136a55 SHA512 eb6f4fd458da3e3e1121ff72da0dfb2bdc38cec98bdaf538e6761563aa176aae2439e4949424795c239a8fa8ebde507564452495ef71f3f7f19b25435e10a41a |
24 |
-DIST calibre-4.11.1.tar.xz 37042376 BLAKE2B a21a6d01afce4f0a02c1fe6cfba9a77cabd88da72ddb761368ad606d6eb08e3126bd53099a075c26503e91187699d4fef5e8ab3290b7c1e9c94c8310db23af6f SHA512 b6ad65da63f1ec5665116cfc82b8bc1c462d94842d1f53034417db6aa5fbb2e4f90801cba1daa76c54a2c6689e14ae12857cf234afe90356931b8458aeb5ab5a |
25 |
DIST calibre-4.11.2.tar.xz 37045372 BLAKE2B 7d76d45afd9228d6346daefaf4ee7cbf4d3281379c96d0ae63b3073b6b5ed055bd2eca0ae728f1471460e3aa8cf9b3afa3e489c4c2f02c6849b39b94e2c2023a SHA512 64f1779ea16e2aedbc91e815b015ffbcfcc2d50035dddc9b33588007ceeeaa5cf4cca84b40fbc9c5808e9b6dab3b04047f37505815120a1e66650447363672f2 |
26 |
DIST calibre-4.12.0.tar.xz 36823140 BLAKE2B b8dd24152b79790c8d22d3c0aa9482f69250fe177499e01c6c0564bf31946d0266a2e3053549f037c7ea7626b18a27798097bfbe0caf93f97585d4869c475ab9 SHA512 628308273b507ee2557cd089e5c7b77f8304c1728b9aadfe5493b22042bdcf2da4c07652a6432121b5dd432807bcda21fabb81c37e59f87d24ace52539f3244c |
27 |
DIST calibre-4.9.1.tar.xz 37529656 BLAKE2B 5d703ca0c398b43cc26a54e0628d0fe938c6a5027a4fd0c9cac83944e5143eb08439bf79b2098182be7727eaa042748f17866788b02c7744178dce131f6b1d1e SHA512 bf06aa3cbc8d255934f3f7f3ce20b4798edf107ed9f822943d2b4ae7d95473842928ed79f8ba7571f7e0ebdc267c441916d543d5b7630aae5cb151bcc3184b71 |
28 |
|
29 |
diff --git a/app-text/calibre/calibre-4.10.1-r2.ebuild b/app-text/calibre/calibre-4.10.1-r2.ebuild |
30 |
deleted file mode 100644 |
31 |
index 08411595122..00000000000 |
32 |
--- a/app-text/calibre/calibre-4.10.1-r2.ebuild |
33 |
+++ /dev/null |
34 |
@@ -1,274 +0,0 @@ |
35 |
-# Copyright 1999-2020 Gentoo Authors |
36 |
-# Distributed under the terms of the GNU General Public License v2 |
37 |
- |
38 |
-EAPI=7 |
39 |
- |
40 |
-PYTHON_COMPAT=( python2_7 python3_{6,7} ) |
41 |
-PYTHON_REQ_USE="sqlite,ssl" |
42 |
- |
43 |
-inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils |
44 |
- |
45 |
-DESCRIPTION="Ebook management application" |
46 |
-HOMEPAGE="https://calibre-ebook.com/" |
47 |
-SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
48 |
- |
49 |
-LICENSE=" |
50 |
- GPL-3+ |
51 |
- GPL-3 |
52 |
- GPL-2+ |
53 |
- GPL-2 |
54 |
- GPL-1+ |
55 |
- LGPL-3+ |
56 |
- LGPL-2.1+ |
57 |
- LGPL-2.1 |
58 |
- BSD |
59 |
- MIT |
60 |
- Old-MIT |
61 |
- Apache-2.0 |
62 |
- public-domain |
63 |
- || ( Artistic GPL-1+ ) |
64 |
- CC-BY-3.0 |
65 |
- OFL-1.1 |
66 |
- PSF-2 |
67 |
-" |
68 |
-KEYWORDS="~amd64 ~arm ~x86" |
69 |
-SLOT="0" |
70 |
-IUSE="ios +udisks" |
71 |
- |
72 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
73 |
- |
74 |
-COMMON_DEPEND="${PYTHON_DEPS} |
75 |
- >=app-text/hunspell-1.7:= |
76 |
- >=app-text/podofo-0.9.6_pre20171027:= |
77 |
- >=app-text/poppler-0.26.5[qt5] |
78 |
- >=dev-libs/chmlib-0.40:= |
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 |
- >=sys-apps/dbus-1.10.8 |
85 |
- $(python_gen_cond_dep ' |
86 |
- >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}] |
87 |
- dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}] |
88 |
- >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}] |
89 |
- >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}] |
90 |
- >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}] |
91 |
- >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}] |
92 |
- dev-python/dnspython[${PYTHON_MULTI_USEDEP}] |
93 |
- >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}] |
94 |
- >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}] |
95 |
- >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}] |
96 |
- >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}] |
97 |
- >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}] |
98 |
- >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}] |
99 |
- >=dev-python/msgpack-0.5.6[${PYTHON_MULTI_USEDEP}] |
100 |
- >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}] |
101 |
- >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}] |
102 |
- >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}] |
103 |
- >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}] |
104 |
- >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}] |
105 |
- >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}] |
106 |
- >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}] |
107 |
- dev-python/regex[${PYTHON_MULTI_USEDEP}] |
108 |
- ') |
109 |
- dev-qt/qtcore:5= |
110 |
- dev-qt/qtdbus:5= |
111 |
- dev-qt/qtgui:5= |
112 |
- >=dev-qt/qtwebengine-5.12 |
113 |
- dev-qt/qtwidgets:5= |
114 |
- dev-util/desktop-file-utils |
115 |
- dev-util/gtk-update-icon-cache |
116 |
- media-fonts/liberation-fonts |
117 |
- media-libs/fontconfig:= |
118 |
- >=media-libs/freetype-2:= |
119 |
- >=media-libs/libmtp-1.1.11:= |
120 |
- >=media-libs/libwmf-0.2.8 |
121 |
- >=media-gfx/optipng-0.7.6 |
122 |
- >=sys-libs/zlib-1.2.11:= |
123 |
- virtual/libusb:1= |
124 |
- x11-libs/libxkbcommon:= |
125 |
- x11-libs/libX11:= |
126 |
- x11-libs/libXext:= |
127 |
- x11-libs/libXrender:= |
128 |
- x11-misc/shared-mime-info |
129 |
- >=x11-misc/xdg-utils-1.0.2-r2 |
130 |
- ios? ( |
131 |
- >=app-pda/usbmuxd-1.0.8 |
132 |
- >=app-pda/libimobiledevice-1.2.0 |
133 |
- ) |
134 |
- udisks? ( virtual/libudev )" |
135 |
-RDEPEND="${COMMON_DEPEND} |
136 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
137 |
-DEPEND="${COMMON_DEPEND} |
138 |
- $(python_gen_cond_dep ' |
139 |
- >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}] |
140 |
- dev-python/sip[${PYTHON_MULTI_USEDEP}] |
141 |
- ') |
142 |
- >=virtual/podofo-build-0.9.6_pre20171027 |
143 |
- virtual/pkgconfig" |
144 |
- |
145 |
-pkg_pretend() { |
146 |
- if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then |
147 |
- eerror "Calibre cannot be built with this version of gcc." |
148 |
- eerror "You need at least gcc-6.0" |
149 |
- die "Your C compiler is too old for this package." |
150 |
- fi |
151 |
-} |
152 |
- |
153 |
-src_prepare() { |
154 |
- # no_updates: do not annoy user with "new version is availible all the time |
155 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
156 |
- eapply \ |
157 |
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
158 |
- "${FILESDIR}/${PN}-disable_plugins.patch" \ |
159 |
- "${FILESDIR}/${PN}-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch" |
160 |
- |
161 |
- eapply_user |
162 |
- |
163 |
- # Fix outdated version constant. |
164 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
165 |
- # -i src/calibre/constants.py || \ |
166 |
- # die "sed failed to patch constants.py" |
167 |
- |
168 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
169 |
- # calls xdg-* (bug #258938). |
170 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
171 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
172 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
173 |
- -e "s|, PreserveMIMEDefaults():|:|" \ |
174 |
- -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
175 |
- -e "s|cmd\[2\]|cmd[4]|" \ |
176 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
177 |
- -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
178 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
179 |
- |
180 |
- # Disable unnecessary privilege dropping for bug #287067. |
181 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
182 |
- -i setup/install.py || die "sed failed to patch install.py" |
183 |
- |
184 |
- sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
185 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
186 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
187 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
188 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
189 |
-'-i', 'Makefile'])" \ |
190 |
- -i setup/build.py || die "sed failed to patch build.py" |
191 |
-} |
192 |
- |
193 |
-src_install() { |
194 |
- # calibre works with python 3, so remove the python 2 constraint |
195 |
- export CALIBRE_PY3_PORT=1 |
196 |
- |
197 |
- # Bypass kbuildsycoca and update-mime-database in order to |
198 |
- # avoid sandbox violations if xdg-mime tries to call them. |
199 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
200 |
- #!${BASH} |
201 |
- echo $0 : $@ |
202 |
- exit 0 |
203 |
- EOF |
204 |
- |
205 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
206 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
207 |
- |
208 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
209 |
- |
210 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
211 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
212 |
- export -n DISPLAY |
213 |
- |
214 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
215 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
216 |
- # return _parse_localename(localename) |
217 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
218 |
- # raise ValueError, 'unknown locale: %s' % localename |
219 |
- #ValueError: unknown locale: 46 |
220 |
- export -n LANG LANGUAGE ${!LC_*} |
221 |
- export LC_ALL=C.utf8 #709682 |
222 |
- |
223 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
224 |
- # variables to point to our fake temporary $HOME. |
225 |
- export HOME="${T}/fake_homedir" |
226 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
227 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
228 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
229 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
230 |
- |
231 |
- tc-export CC CXX |
232 |
- # Bug #334243 - respect LDFLAGS when building extensions |
233 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
234 |
- local libdir=$(get_libdir) |
235 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
236 |
- |
237 |
- addpredict /dev/dri #665310 |
238 |
- |
239 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
240 |
- "${PYTHON}" setup.py install \ |
241 |
- --root="${D}" \ |
242 |
- --prefix="${EPREFIX}/usr" \ |
243 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
244 |
- --staging-root="${ED}/usr" \ |
245 |
- --staging-libdir="${ED}/usr/${libdir}" || die |
246 |
- |
247 |
- rm "${ED}/usr/share/applications/defaults.list" || die |
248 |
- find "${ED}"/usr/share -type d -empty -delete |
249 |
- |
250 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
251 |
- local x |
252 |
- for x in * ; do |
253 |
- [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue |
254 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
255 |
- done |
256 |
- |
257 |
- einfo "Converting python shebangs" |
258 |
- python_fix_shebang --force "${ED}" |
259 |
- |
260 |
- einfo "Compiling python modules" |
261 |
- python_optimize "${ED}"/usr/lib/calibre |
262 |
- |
263 |
- newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
264 |
- newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
265 |
- |
266 |
- bashcomp_alias calibre \ |
267 |
- lrfviewer \ |
268 |
- calibre-debug \ |
269 |
- ebook-meta \ |
270 |
- calibre-server \ |
271 |
- ebook-viewer \ |
272 |
- ebook-polish \ |
273 |
- fetch-ebook-metadata \ |
274 |
- lrf2lrs \ |
275 |
- ebook-convert \ |
276 |
- ebook-edit \ |
277 |
- calibre-smtp \ |
278 |
- ebook-device |
279 |
- |
280 |
-} |
281 |
- |
282 |
-pkg_preinst() { |
283 |
- # Indentify stray directories from upstream's "Binary install" |
284 |
- # method (see bug 622728). |
285 |
- CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
286 |
- CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do |
287 |
- printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}" |
288 |
-} |
289 |
- |
290 |
-pkg_postinst() { |
291 |
- [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
292 |
- local x |
293 |
- for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do |
294 |
- if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
295 |
- elog "Purging '${x}'" |
296 |
- rm -rf "${x}" |
297 |
- fi |
298 |
- done |
299 |
- xdg_desktop_database_update |
300 |
- xdg_mimeinfo_database_update |
301 |
- xdg_icon_cache_update |
302 |
-} |
303 |
- |
304 |
-pkg_postrm() { |
305 |
- xdg_desktop_database_update |
306 |
- xdg_mimeinfo_database_update |
307 |
- xdg_icon_cache_update |
308 |
-} |
309 |
|
310 |
diff --git a/app-text/calibre/calibre-4.11.1.ebuild b/app-text/calibre/calibre-4.11.1.ebuild |
311 |
deleted file mode 100644 |
312 |
index 25d08cce198..00000000000 |
313 |
--- a/app-text/calibre/calibre-4.11.1.ebuild |
314 |
+++ /dev/null |
315 |
@@ -1,274 +0,0 @@ |
316 |
-# Copyright 1999-2020 Gentoo Authors |
317 |
-# Distributed under the terms of the GNU General Public License v2 |
318 |
- |
319 |
-EAPI=7 |
320 |
- |
321 |
-PYTHON_COMPAT=( python3_{6,7} ) |
322 |
-PYTHON_REQ_USE="sqlite,ssl" |
323 |
- |
324 |
-inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils |
325 |
- |
326 |
-DESCRIPTION="Ebook management application" |
327 |
-HOMEPAGE="https://calibre-ebook.com/" |
328 |
-SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
329 |
- |
330 |
-LICENSE=" |
331 |
- GPL-3+ |
332 |
- GPL-3 |
333 |
- GPL-2+ |
334 |
- GPL-2 |
335 |
- GPL-1+ |
336 |
- LGPL-3+ |
337 |
- LGPL-2.1+ |
338 |
- LGPL-2.1 |
339 |
- BSD |
340 |
- MIT |
341 |
- Old-MIT |
342 |
- Apache-2.0 |
343 |
- public-domain |
344 |
- || ( Artistic GPL-1+ ) |
345 |
- CC-BY-3.0 |
346 |
- OFL-1.1 |
347 |
- PSF-2 |
348 |
-" |
349 |
-KEYWORDS="~amd64 ~x86" |
350 |
-SLOT="0" |
351 |
-IUSE="ios +udisks" |
352 |
- |
353 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
354 |
- |
355 |
-COMMON_DEPEND="${PYTHON_DEPS} |
356 |
- >=app-text/hunspell-1.7:= |
357 |
- >=app-text/podofo-0.9.6_pre20171027:= |
358 |
- >=app-text/poppler-0.26.5[qt5] |
359 |
- >=dev-libs/chmlib-0.40:= |
360 |
- dev-libs/glib:2= |
361 |
- dev-libs/hyphen:= |
362 |
- >=dev-libs/icu-57.1:= |
363 |
- dev-libs/libinput:= |
364 |
- >=dev-libs/dbus-glib-0.106 |
365 |
- >=sys-apps/dbus-1.10.8 |
366 |
- $(python_gen_cond_dep ' |
367 |
- >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}] |
368 |
- dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}] |
369 |
- >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}] |
370 |
- >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}] |
371 |
- >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}] |
372 |
- >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}] |
373 |
- dev-python/dnspython[${PYTHON_MULTI_USEDEP}] |
374 |
- >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}] |
375 |
- >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}] |
376 |
- >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}] |
377 |
- >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}] |
378 |
- >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}] |
379 |
- >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}] |
380 |
- >=dev-python/msgpack-0.5.6[${PYTHON_MULTI_USEDEP}] |
381 |
- >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}] |
382 |
- >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}] |
383 |
- >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}] |
384 |
- >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}] |
385 |
- >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}] |
386 |
- >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}] |
387 |
- >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}] |
388 |
- dev-python/regex[${PYTHON_MULTI_USEDEP}] |
389 |
- dev-python/zeroconf[${PYTHON_MULTI_USEDEP}] |
390 |
- ') |
391 |
- dev-qt/qtcore:5= |
392 |
- dev-qt/qtdbus:5= |
393 |
- dev-qt/qtgui:5= |
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 sys-fs/udisks:0 ) )" |
419 |
-DEPEND="${COMMON_DEPEND} |
420 |
- $(python_gen_cond_dep ' |
421 |
- >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}] |
422 |
- dev-python/sip[${PYTHON_MULTI_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 |
- |
465 |
- sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
466 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
467 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
468 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
469 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
470 |
-'-i', 'Makefile'])" \ |
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 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
481 |
- #!${BASH} |
482 |
- echo $0 : $@ |
483 |
- exit 0 |
484 |
- EOF |
485 |
- |
486 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
487 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
488 |
- |
489 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
490 |
- |
491 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
492 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
493 |
- export -n DISPLAY |
494 |
- |
495 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
496 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
497 |
- # return _parse_localename(localename) |
498 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
499 |
- # raise ValueError, 'unknown locale: %s' % localename |
500 |
- #ValueError: unknown locale: 46 |
501 |
- export -n LANG LANGUAGE ${!LC_*} |
502 |
- export LC_ALL=C.utf8 #709682 |
503 |
- |
504 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
505 |
- # variables to point to our fake temporary $HOME. |
506 |
- export HOME="${T}/fake_homedir" |
507 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
508 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
509 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
510 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
511 |
- |
512 |
- tc-export CC CXX |
513 |
- # Bug #334243 - respect LDFLAGS when building extensions |
514 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
515 |
- local libdir=$(get_libdir) |
516 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
517 |
- |
518 |
- addpredict /dev/dri #665310 |
519 |
- |
520 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
521 |
- "${PYTHON}" setup.py install \ |
522 |
- --root="${D}" \ |
523 |
- --prefix="${EPREFIX}/usr" \ |
524 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
525 |
- --staging-root="${ED}/usr" \ |
526 |
- --staging-libdir="${ED}/usr/${libdir}" || die |
527 |
- |
528 |
- rm "${ED}/usr/share/applications/defaults.list" || die |
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/lib/calibre |
543 |
- |
544 |
- newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
545 |
- newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
546 |
- |
547 |
- bashcomp_alias calibre \ |
548 |
- lrfviewer \ |
549 |
- calibre-debug \ |
550 |
- ebook-meta \ |
551 |
- calibre-server \ |
552 |
- ebook-viewer \ |
553 |
- ebook-polish \ |
554 |
- fetch-ebook-metadata \ |
555 |
- lrf2lrs \ |
556 |
- ebook-convert \ |
557 |
- ebook-edit \ |
558 |
- calibre-smtp \ |
559 |
- ebook-device |
560 |
- |
561 |
-} |
562 |
- |
563 |
-pkg_preinst() { |
564 |
- # Indentify stray directories from upstream's "Binary install" |
565 |
- # method (see bug 622728). |
566 |
- CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
567 |
- CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do |
568 |
- printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}" |
569 |
-} |
570 |
- |
571 |
-pkg_postinst() { |
572 |
- [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
573 |
- local x |
574 |
- for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do |
575 |
- if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
576 |
- elog "Purging '${x}'" |
577 |
- rm -rf "${x}" |
578 |
- fi |
579 |
- done |
580 |
- xdg_desktop_database_update |
581 |
- xdg_mimeinfo_database_update |
582 |
- xdg_icon_cache_update |
583 |
-} |
584 |
- |
585 |
-pkg_postrm() { |
586 |
- xdg_desktop_database_update |
587 |
- xdg_mimeinfo_database_update |
588 |
- xdg_icon_cache_update |
589 |
-} |