1 |
commit: 206debb82f5800be70e4f02506f9a0b3b0a471f6 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 1 18:26:55 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 1 18:26:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=206debb8 |
7 |
|
8 |
app-text/calibre: remove old versions |
9 |
|
10 |
Package-Manager: Portage-2.3.10, Repoman-2.3.3 |
11 |
|
12 |
app-text/calibre/Manifest | 2 - |
13 |
app-text/calibre/calibre-2.85.1.ebuild | 257 ---------------------------- |
14 |
app-text/calibre/calibre-3.1.1-r2.ebuild | 276 ------------------------------- |
15 |
3 files changed, 535 deletions(-) |
16 |
|
17 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
18 |
index 78d41d4bcc8..e43d57044fb 100644 |
19 |
--- a/app-text/calibre/Manifest |
20 |
+++ b/app-text/calibre/Manifest |
21 |
@@ -1,4 +1,2 @@ |
22 |
DIST calibre-2.78.0.tar.xz 38739404 SHA256 d2b0b0c5451d3ac05ce9de0b801ddf8de7664fee45f273d7ee8445a1ec2f898b SHA512 0779ac385dde45ac4baee7cecb0916e245f3e1cf20662bad9d9a4278265390b1aa89c2b478601b57113e7de08a69343288488ee299e8b43332f0129e650aa0ca WHIRLPOOL 325fc344445078ef0df0a29b4cd8e32445a881ede89e3db87606166ff0c8b7db10b7cc34432e63c2bb49382537a5107686339b987f1be807d59a1786ddfd4a75 |
23 |
-DIST calibre-2.85.1.tar.xz 37783284 SHA256 8c8db280c51b26284bff1c066fb503ecef9e1f15f7e2e7b4f705c817ee041abd SHA512 ce29924213fa7461bbf2fc62f26bd53e4eafdf3b0dd58e241071592be4ee038cdb3ac6ac2982229dd0e52595a93aca7d921640ea55796950d1f3ac3c2742af4f WHIRLPOOL 1432f71c19c8ff41dede3370287813281557f3659c862e7a9fe76d548bf393d8dd889aa4dc92d514244b2d35ce25b962c2942ef3dec2bf1ebaa81b1ea6bd0c94 |
24 |
-DIST calibre-3.1.1.tar.xz 35841216 SHA256 cfa00b953cf68f0760a4588c8adad066749cce673178e85e4c249790c07f01d2 SHA512 1da11ede70d93fa608873726fdcd9b39f261c045ea874521b45211df951bdb15e62958f50628eb6cfcfef2ff14b89da74b0f89481f3671480dbc9589b096d695 WHIRLPOOL fa85b83fc2502cdbdb12259a0d56cff9867606088f62b6a147ee4fa0f99174d5e74a396239b07441124da839aa1000d8ba146b588290b30a70a1caa1166003c0 |
25 |
DIST calibre-3.3.0.tar.xz 36308116 SHA256 0cd42109f432995a75bd921a37444c142cc25d178083857efbac756f615403ff SHA512 bb63f83d5e35079daba9ec6e7849e6a65c51cf0b2da9fc45b86a2b64cc147f862f08413730f3d2710793de7b045fc73913534dfca11b128ad0ea72e92033f977 WHIRLPOOL 151c6633f53e75b097276f026fedd083b8b7aa28b28e4d2d0de587a3e8280e40f04a13998b8eae5a9f54f1041e7a8b85fa8de99734437b4246bf66664ce31a7d |
26 |
|
27 |
diff --git a/app-text/calibre/calibre-2.85.1.ebuild b/app-text/calibre/calibre-2.85.1.ebuild |
28 |
deleted file mode 100644 |
29 |
index 8bbbb010548..00000000000 |
30 |
--- a/app-text/calibre/calibre-2.85.1.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,257 +0,0 @@ |
33 |
-# Copyright 1999-2017 Gentoo Foundation |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=6 |
37 |
- |
38 |
-PYTHON_COMPAT=( python2_7 ) |
39 |
-PYTHON_REQ_USE="sqlite,ssl" |
40 |
- |
41 |
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1 |
42 |
- |
43 |
-DESCRIPTION="Ebook management application" |
44 |
-HOMEPAGE="http://calibre-ebook.com/" |
45 |
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
46 |
- |
47 |
-LICENSE=" |
48 |
- GPL-3+ |
49 |
- GPL-3 |
50 |
- GPL-2+ |
51 |
- GPL-2 |
52 |
- GPL-1+ |
53 |
- LGPL-3+ |
54 |
- LGPL-2.1+ |
55 |
- LGPL-2.1 |
56 |
- BSD |
57 |
- MIT |
58 |
- Old-MIT |
59 |
- Apache-2.0 |
60 |
- public-domain |
61 |
- || ( Artistic GPL-1+ ) |
62 |
- CC-BY-3.0 |
63 |
- OFL-1.1 |
64 |
- PSF-2 |
65 |
- unRAR |
66 |
-" |
67 |
-KEYWORDS="~amd64 ~arm ~x86" |
68 |
-SLOT="0" |
69 |
-IUSE="ios +udisks" |
70 |
- |
71 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
72 |
- |
73 |
-COMMON_DEPEND="${PYTHON_DEPS} |
74 |
- >=app-text/podofo-0.8.2:= |
75 |
- >=app-text/poppler-0.26.5[qt5] |
76 |
- >=dev-libs/chmlib-0.40:= |
77 |
- dev-libs/glib:2 |
78 |
- >=dev-libs/icu-57.1:= |
79 |
- >=dev-python/apsw-3.13.0[${PYTHON_USEDEP}] |
80 |
- >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
81 |
- >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
82 |
- >=dev-python/cssutils-1.0.1[${PYTHON_USEDEP}] |
83 |
- >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}] |
84 |
- >=dev-libs/dbus-glib-0.106 |
85 |
- >=sys-apps/dbus-1.10.8 |
86 |
- >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}] |
87 |
- >=dev-python/mechanize-0.2.5[${PYTHON_USEDEP}] |
88 |
- dev-python/netifaces[${PYTHON_USEDEP}] |
89 |
- dev-python/pillow[${PYTHON_USEDEP}] |
90 |
- dev-python/psutil[${PYTHON_USEDEP}] |
91 |
- >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}] |
92 |
- >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
93 |
- >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
94 |
- dev-qt/qtcore:5 |
95 |
- dev-qt/qtgui:5 |
96 |
- dev-qt/qtwidgets:5 |
97 |
- media-fonts/liberation-fonts |
98 |
- >=media-gfx/imagemagick-6.5.9[jpeg,png] |
99 |
- media-libs/fontconfig |
100 |
- >=media-libs/freetype-2:= |
101 |
- >=media-libs/libmtp-1.1.11:= |
102 |
- >=media-libs/libwmf-0.2.8 |
103 |
- >=media-gfx/optipng-0.7.6 |
104 |
- sys-libs/zlib |
105 |
- virtual/libusb:1= |
106 |
- virtual/python-dnspython[${PYTHON_USEDEP}] |
107 |
- x11-libs/libX11 |
108 |
- x11-libs/libXext |
109 |
- x11-libs/libXrender |
110 |
- >=x11-misc/xdg-utils-1.0.2-r2 |
111 |
- ios? ( |
112 |
- >=app-pda/usbmuxd-1.0.8 |
113 |
- >=app-pda/libimobiledevice-1.2.0 |
114 |
- ) |
115 |
- udisks? ( virtual/libudev )" |
116 |
-RDEPEND="${COMMON_DEPEND} |
117 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
118 |
-DEPEND="${COMMON_DEPEND} |
119 |
- >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
120 |
- >=virtual/podofo-build-0.9.4 |
121 |
- virtual/pkgconfig" |
122 |
- |
123 |
-src_prepare() { |
124 |
- # no_updates: do not annoy user with "new version is availible all the time |
125 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
126 |
- eapply \ |
127 |
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
128 |
- "${FILESDIR}/${PN}-disable_plugins.patch" |
129 |
- |
130 |
- eapply_user |
131 |
- |
132 |
- # Fix outdated version constant. |
133 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
134 |
- # -i src/calibre/constants.py || \ |
135 |
- # die "sed failed to patch constants.py" |
136 |
- |
137 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
138 |
- # calls xdg-* (bug #258938). |
139 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
140 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
141 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
142 |
- -e "s|, PreserveMIMEDefaults():|:|" \ |
143 |
- -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
144 |
- -e "s|cmd\[2\]|cmd[4]|" \ |
145 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
146 |
- -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
147 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
148 |
- |
149 |
- # Disable unnecessary privilege dropping for bug #287067. |
150 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
151 |
- -i setup/install.py || die "sed failed to patch install.py" |
152 |
- |
153 |
- sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
154 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
155 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
156 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
157 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
158 |
-'-i', 'Makefile'])" \ |
159 |
- -i setup/build.py || die "sed failed to patch build.py" |
160 |
- |
161 |
- # use system beautifulsoup, instead of bundled |
162 |
- rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
163 |
- || die "could not remove bundled beautifulsoup" |
164 |
- find "${S}" -type f -name \*.py -exec \ |
165 |
- sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
166 |
- || die "could not sed bundled beautifulsoup out of the source tree" |
167 |
- |
168 |
- # avoid failure of xdg tools to recognize vendor prefix |
169 |
- sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
170 |
- -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
171 |
- -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
172 |
- -i "${S}"/src/calibre/linux.py || die 'sed failed' |
173 |
- |
174 |
- # don't create/install uninstaller |
175 |
- sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die |
176 |
-} |
177 |
- |
178 |
-src_install() { |
179 |
- # Bypass kbuildsycoca and update-mime-database in order to |
180 |
- # avoid sandbox violations if xdg-mime tries to call them. |
181 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
182 |
- #!${BASH} |
183 |
- echo $0 : $@ |
184 |
- exit 0 |
185 |
- EOF |
186 |
- |
187 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
188 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
189 |
- |
190 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
191 |
- |
192 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
193 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
194 |
- export -n DISPLAY |
195 |
- |
196 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
197 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
198 |
- # return _parse_localename(localename) |
199 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
200 |
- # raise ValueError, 'unknown locale: %s' % localename |
201 |
- #ValueError: unknown locale: 46 |
202 |
- export -n LANGUAGE |
203 |
- |
204 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
205 |
- # variables to point to our fake temporary $HOME. |
206 |
- export HOME="${T}/fake_homedir" |
207 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
208 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
209 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
210 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
211 |
- |
212 |
- tc-export CC CXX |
213 |
- # Bug #334243 - respect LDFLAGS when building extensions |
214 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
215 |
- local libdir=$(get_libdir) |
216 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
217 |
- |
218 |
- # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
219 |
- local x |
220 |
- for x in /dev/dri/card[0-9] ; do |
221 |
- [[ -e ${x} ]] && addpredict ${x} |
222 |
- done |
223 |
- |
224 |
- #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
225 |
- #dodir $(python_get_sitedir) |
226 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
227 |
- "${PYTHON}" setup.py install \ |
228 |
- --root="${D}" \ |
229 |
- --prefix="${EPREFIX}/usr" \ |
230 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
231 |
- --staging-root="${ED}usr" \ |
232 |
- --staging-libdir="${ED}usr/${libdir}" || die |
233 |
- |
234 |
- # The menu entries end up here due to '--mode user' being added to |
235 |
- # xdg-* options in src_prepare. |
236 |
- dodir /usr/share/mime/packages |
237 |
- chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
238 |
- mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
239 |
- die "failed to register mime types" |
240 |
- dodir /usr/share/icons |
241 |
- mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
242 |
- die "failed to install icon files" |
243 |
- |
244 |
- domenu "${HOME}"/.local/share/applications/*.desktop || |
245 |
- die "failed to install .desktop menu files" |
246 |
- |
247 |
- find "${ED}"usr/share -type d -empty -delete |
248 |
- |
249 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
250 |
- local x |
251 |
- for x in * ; do |
252 |
- [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
253 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
254 |
- done |
255 |
- |
256 |
- einfo "Converting python shebangs" |
257 |
- python_fix_shebang "${ED}" |
258 |
- |
259 |
- einfo "Compiling python modules" |
260 |
- python_optimize "${ED}"usr/lib/calibre |
261 |
- |
262 |
- newinitd "${FILESDIR}"/calibre-server.init calibre-server |
263 |
- newconfd "${FILESDIR}"/calibre-server.conf calibre-server |
264 |
- |
265 |
- bashcomp_alias calibre \ |
266 |
- lrfviewer \ |
267 |
- calibre-debug \ |
268 |
- ebook-meta \ |
269 |
- calibre-server \ |
270 |
- ebook-viewer \ |
271 |
- ebook-polish \ |
272 |
- fetch-ebook-metadata \ |
273 |
- lrf2lrs \ |
274 |
- ebook-convert \ |
275 |
- ebook-edit \ |
276 |
- calibre-smtp \ |
277 |
- ebook-device |
278 |
- |
279 |
-} |
280 |
- |
281 |
-pkg_postinst() { |
282 |
- fdo-mime_desktop_database_update |
283 |
- fdo-mime_mime_database_update |
284 |
-} |
285 |
- |
286 |
-pkg_postrm() { |
287 |
- fdo-mime_desktop_database_update |
288 |
- fdo-mime_mime_database_update |
289 |
-} |
290 |
|
291 |
diff --git a/app-text/calibre/calibre-3.1.1-r2.ebuild b/app-text/calibre/calibre-3.1.1-r2.ebuild |
292 |
deleted file mode 100644 |
293 |
index 46710a8a845..00000000000 |
294 |
--- a/app-text/calibre/calibre-3.1.1-r2.ebuild |
295 |
+++ /dev/null |
296 |
@@ -1,276 +0,0 @@ |
297 |
-# Copyright 1999-2017 Gentoo Foundation |
298 |
-# Distributed under the terms of the GNU General Public License v2 |
299 |
- |
300 |
-EAPI=6 |
301 |
- |
302 |
-PYTHON_COMPAT=( python2_7 ) |
303 |
-PYTHON_REQ_USE="sqlite,ssl" |
304 |
- |
305 |
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1 |
306 |
- |
307 |
-DESCRIPTION="Ebook management application" |
308 |
-HOMEPAGE="http://calibre-ebook.com/" |
309 |
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
310 |
- |
311 |
-LICENSE=" |
312 |
- GPL-3+ |
313 |
- GPL-3 |
314 |
- GPL-2+ |
315 |
- GPL-2 |
316 |
- GPL-1+ |
317 |
- LGPL-3+ |
318 |
- LGPL-2.1+ |
319 |
- LGPL-2.1 |
320 |
- BSD |
321 |
- MIT |
322 |
- Old-MIT |
323 |
- Apache-2.0 |
324 |
- public-domain |
325 |
- || ( Artistic GPL-1+ ) |
326 |
- CC-BY-3.0 |
327 |
- OFL-1.1 |
328 |
- PSF-2 |
329 |
- unRAR |
330 |
-" |
331 |
-KEYWORDS="~amd64 ~arm ~x86" |
332 |
-SLOT="0" |
333 |
-IUSE="ios +udisks" |
334 |
- |
335 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
336 |
- |
337 |
-COMMON_DEPEND="${PYTHON_DEPS} |
338 |
- >=app-text/podofo-0.8.2:= |
339 |
- >=app-text/poppler-0.26.5[qt5] |
340 |
- >=dev-libs/chmlib-0.40:= |
341 |
- dev-libs/glib:2 |
342 |
- >=dev-libs/icu-57.1:= |
343 |
- >=dev-python/apsw-3.13.0[${PYTHON_USEDEP}] |
344 |
- >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
345 |
- dev-python/chardet[${PYTHON_USEDEP}] |
346 |
- >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
347 |
- >=dev-python/cssutils-1.0.1[${PYTHON_USEDEP}] |
348 |
- >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}] |
349 |
- >=dev-libs/dbus-glib-0.106 |
350 |
- >=sys-apps/dbus-1.10.8 |
351 |
- >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}] |
352 |
- >=dev-python/mechanize-0.2.5[${PYTHON_USEDEP}] |
353 |
- dev-python/msgpack[${PYTHON_USEDEP}] |
354 |
- dev-python/netifaces[${PYTHON_USEDEP}] |
355 |
- dev-python/pillow[${PYTHON_USEDEP}] |
356 |
- dev-python/psutil[${PYTHON_USEDEP}] |
357 |
- >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}] |
358 |
- >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
359 |
- >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
360 |
- dev-python/regex[${PYTHON_USEDEP}] |
361 |
- dev-qt/qtcore:5 |
362 |
- dev-qt/qtgui:5 |
363 |
- dev-qt/qtwidgets:5 |
364 |
- media-fonts/liberation-fonts |
365 |
- >=media-gfx/imagemagick-6.5.9[jpeg,png] |
366 |
- media-libs/fontconfig |
367 |
- >=media-libs/freetype-2:= |
368 |
- >=media-libs/libmtp-1.1.11:= |
369 |
- >=media-libs/libwmf-0.2.8 |
370 |
- >=media-gfx/optipng-0.7.6 |
371 |
- sys-libs/zlib |
372 |
- virtual/libusb:1= |
373 |
- virtual/python-dnspython[${PYTHON_USEDEP}] |
374 |
- x11-libs/libX11 |
375 |
- x11-libs/libXext |
376 |
- x11-libs/libXrender |
377 |
- >=x11-misc/xdg-utils-1.0.2-r2 |
378 |
- ios? ( |
379 |
- >=app-pda/usbmuxd-1.0.8 |
380 |
- >=app-pda/libimobiledevice-1.2.0 |
381 |
- ) |
382 |
- udisks? ( virtual/libudev )" |
383 |
-RDEPEND="${COMMON_DEPEND} |
384 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
385 |
-DEPEND="${COMMON_DEPEND} |
386 |
- >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
387 |
- >=virtual/podofo-build-0.9.4 |
388 |
- virtual/pkgconfig" |
389 |
- |
390 |
-src_prepare() { |
391 |
- # no_updates: do not annoy user with "new version is availible all the time |
392 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
393 |
- eapply \ |
394 |
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
395 |
- "${FILESDIR}/${PN}-disable_plugins.patch" |
396 |
- |
397 |
- eapply_user |
398 |
- |
399 |
- # Fix outdated version constant. |
400 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
401 |
- # -i src/calibre/constants.py || \ |
402 |
- # die "sed failed to patch constants.py" |
403 |
- |
404 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
405 |
- # calls xdg-* (bug #258938). |
406 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
407 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
408 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
409 |
- -e "s|, PreserveMIMEDefaults():|:|" \ |
410 |
- -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
411 |
- -e "s|cmd\[2\]|cmd[4]|" \ |
412 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
413 |
- -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
414 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
415 |
- |
416 |
- # Disable unnecessary privilege dropping for bug #287067. |
417 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
418 |
- -i setup/install.py || die "sed failed to patch install.py" |
419 |
- |
420 |
- sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
421 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
422 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
423 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
424 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
425 |
-'-i', 'Makefile'])" \ |
426 |
- -i setup/build.py || die "sed failed to patch build.py" |
427 |
- |
428 |
- # use system beautifulsoup, instead of bundled |
429 |
- rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
430 |
- || die "could not remove bundled beautifulsoup" |
431 |
- find "${S}" -type f -name \*.py -exec \ |
432 |
- sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
433 |
- || die "could not sed bundled beautifulsoup out of the source tree" |
434 |
- |
435 |
- # avoid failure of xdg tools to recognize vendor prefix |
436 |
- sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
437 |
- -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
438 |
- -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
439 |
- -i "${S}"/src/calibre/linux.py || die 'sed failed' |
440 |
- |
441 |
- # don't create/install uninstaller |
442 |
- sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die |
443 |
-} |
444 |
- |
445 |
-src_install() { |
446 |
- # Bypass kbuildsycoca and update-mime-database in order to |
447 |
- # avoid sandbox violations if xdg-mime tries to call them. |
448 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
449 |
- #!${BASH} |
450 |
- echo $0 : $@ |
451 |
- exit 0 |
452 |
- EOF |
453 |
- |
454 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
455 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
456 |
- |
457 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
458 |
- |
459 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
460 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
461 |
- export -n DISPLAY |
462 |
- |
463 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
464 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
465 |
- # return _parse_localename(localename) |
466 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
467 |
- # raise ValueError, 'unknown locale: %s' % localename |
468 |
- #ValueError: unknown locale: 46 |
469 |
- export -n LANGUAGE |
470 |
- |
471 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
472 |
- # variables to point to our fake temporary $HOME. |
473 |
- export HOME="${T}/fake_homedir" |
474 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
475 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
476 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
477 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
478 |
- |
479 |
- tc-export CC CXX |
480 |
- # Bug #334243 - respect LDFLAGS when building extensions |
481 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
482 |
- local libdir=$(get_libdir) |
483 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
484 |
- |
485 |
- # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
486 |
- local x |
487 |
- for x in /dev/dri/card[0-9] ; do |
488 |
- [[ -e ${x} ]] && addpredict ${x} |
489 |
- done |
490 |
- |
491 |
- #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
492 |
- #dodir $(python_get_sitedir) |
493 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
494 |
- "${PYTHON}" setup.py install \ |
495 |
- --root="${D}" \ |
496 |
- --prefix="${EPREFIX}/usr" \ |
497 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
498 |
- --staging-root="${ED}usr" \ |
499 |
- --staging-libdir="${ED}usr/${libdir}" || die |
500 |
- |
501 |
- # The menu entries end up here due to '--mode user' being added to |
502 |
- # xdg-* options in src_prepare. |
503 |
- dodir /usr/share/mime/packages |
504 |
- chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
505 |
- mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
506 |
- die "failed to register mime types" |
507 |
- dodir /usr/share/icons |
508 |
- mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
509 |
- die "failed to install icon files" |
510 |
- |
511 |
- domenu "${HOME}"/.local/share/applications/*.desktop || |
512 |
- die "failed to install .desktop menu files" |
513 |
- |
514 |
- find "${ED}"usr/share -type d -empty -delete |
515 |
- |
516 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
517 |
- local x |
518 |
- for x in * ; do |
519 |
- [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
520 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
521 |
- done |
522 |
- |
523 |
- einfo "Converting python shebangs" |
524 |
- python_fix_shebang "${ED}" |
525 |
- |
526 |
- einfo "Compiling python modules" |
527 |
- python_optimize "${ED}"usr/lib/calibre |
528 |
- |
529 |
- newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
530 |
- newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
531 |
- |
532 |
- bashcomp_alias calibre \ |
533 |
- lrfviewer \ |
534 |
- calibre-debug \ |
535 |
- ebook-meta \ |
536 |
- calibre-server \ |
537 |
- ebook-viewer \ |
538 |
- ebook-polish \ |
539 |
- fetch-ebook-metadata \ |
540 |
- lrf2lrs \ |
541 |
- ebook-convert \ |
542 |
- ebook-edit \ |
543 |
- calibre-smtp \ |
544 |
- ebook-device |
545 |
- |
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 |
- fdo-mime_desktop_database_update |
566 |
- fdo-mime_mime_database_update |
567 |
-} |
568 |
- |
569 |
-pkg_postrm() { |
570 |
- fdo-mime_desktop_database_update |
571 |
- fdo-mime_mime_database_update |
572 |
-} |