1 |
commit: eec6496565ecc351a686da8eacdfc04400baa98a |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 15 16:55:44 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 15 16:56:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eec64965 |
7 |
|
8 |
app-text/calibre: remove vulnerable versions for bug 607836 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
app-text/calibre/Manifest | 3 - |
13 |
app-text/calibre/calibre-1.20.ebuild | 213 --------------------------- |
14 |
app-text/calibre/calibre-2.70.0.ebuild | 251 -------------------------------- |
15 |
app-text/calibre/calibre-2.73.0.ebuild | 254 --------------------------------- |
16 |
4 files changed, 721 deletions(-) |
17 |
|
18 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
19 |
index b19dca11de..5004dc1fe8 100644 |
20 |
--- a/app-text/calibre/Manifest |
21 |
+++ b/app-text/calibre/Manifest |
22 |
@@ -1,4 +1 @@ |
23 |
-DIST calibre-1.20.0.tar.xz 32430560 SHA256 475e09b1be4b9977240cbbe6743ab79da4b1f1afe3fe6015d212d868e8f2fac4 SHA512 84ac25080cf4948398b79f9a1af688cca9cf9a5a9200b2aad649f5fda1cd0556be4ade0c8b09ea6ffcc95654eac0aaaa5b8f8ed6ea9830174bc150e64de85e31 WHIRLPOOL 61b6ecde2e3f8679c1afea95dcd152a94ce03522c06dff34b406a5705f6255243f0565fbb5f9bef3ac96d7127190bd1b4363233fa24fafcd0412e061201f6fe8 |
24 |
-DIST calibre-2.70.0.tar.xz 40279720 SHA256 90391605c43db01acd7acf21707f5aa95c329b2055cca1b09b6fa46e050b3ba2 SHA512 1b98cdbd32dd02e64792b5e02ceb010a694c5669b8de3b0d03994b6f1e03e10dfcff6462317e1abfd27ca4b0085897218a12d79dd82604dad8a156d2f0fa5317 WHIRLPOOL d9c61f8d3514631fb8907e2fb5d63e32c6626c9d2fa35a985810b035f5a74c68e0d4fa8a63164c566030190ed362092d4d2145ee5e406fda8d97bbf778afbc1d |
25 |
-DIST calibre-2.73.0.tar.xz 38674308 SHA256 ec05836d60ae6214c3dde22ec7f9340ab77b05eac25b0df5e245b43f553b1a9f SHA512 395ae04ca580b25ec5d72bf2134c073a9182eccf9c30b053a52e342ddf7bec27d2479acba8cde15da175dfd0b6f5f9add54c9a13d9da421c494b70de3217968d WHIRLPOOL b5de25d5c170578c21719e72ead9c2040d338a6e19d8d7af9f788392acf27989c00bf092a6e3f64e4422409bdf2639f1bbc61be088c5baee72b85fe16e9c4b0b |
26 |
DIST calibre-2.78.0.tar.xz 38739404 SHA256 d2b0b0c5451d3ac05ce9de0b801ddf8de7664fee45f273d7ee8445a1ec2f898b SHA512 0779ac385dde45ac4baee7cecb0916e245f3e1cf20662bad9d9a4278265390b1aa89c2b478601b57113e7de08a69343288488ee299e8b43332f0129e650aa0ca WHIRLPOOL 325fc344445078ef0df0a29b4cd8e32445a881ede89e3db87606166ff0c8b7db10b7cc34432e63c2bb49382537a5107686339b987f1be807d59a1786ddfd4a75 |
27 |
|
28 |
diff --git a/app-text/calibre/calibre-1.20.ebuild b/app-text/calibre/calibre-1.20.ebuild |
29 |
deleted file mode 100644 |
30 |
index c2a39b5af8..0000000000 |
31 |
--- a/app-text/calibre/calibre-1.20.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,213 +0,0 @@ |
34 |
-# Copyright 1999-2016 Gentoo Foundation |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
-# $Id$ |
37 |
- |
38 |
-EAPI=5 |
39 |
- |
40 |
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs qmake-utils |
41 |
- |
42 |
-DESCRIPTION="Ebook management application" |
43 |
-HOMEPAGE="http://calibre-ebook.com/" |
44 |
-[[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV} |
45 |
-SRC_URI="https://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.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 |
- |
68 |
-KEYWORDS="amd64 x86" |
69 |
-SLOT="0" |
70 |
-IUSE="+udisks" |
71 |
- |
72 |
-COMMON_DEPEND=" |
73 |
- >=app-text/podofo-0.8.2:= |
74 |
- >=app-text/poppler-0.12.3-r3:=[qt4,xpdf-headers(+)] |
75 |
- >=dev-lang/python-2.7.1:2.7[sqlite,ssl] |
76 |
- >=dev-libs/chmlib-0.40:= |
77 |
- >=dev-libs/icu-4.4:= |
78 |
- dev-python/apsw |
79 |
- >=dev-python/beautifulsoup-3.0.5:python-2 |
80 |
- dev-python/netifaces |
81 |
- >=dev-python/dnspython-1.6.0:py2 |
82 |
- >=dev-python/cssselect-0.7.1 |
83 |
- >=dev-python/cssutils-0.9.9 |
84 |
- >=dev-python/dbus-python-0.82.2 |
85 |
- dev-python/pillow |
86 |
- >=dev-python/lxml-2.2.1 |
87 |
- >=dev-python/mechanize-0.1.11 |
88 |
- >=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)] |
89 |
- || ( >=dev-python/PyQt4-4.11.2-r1[X,compat(-),svg,webkit] <dev-python/PyQt4-4.11.2-r1[X,svg,webkit] ) |
90 |
- media-fonts/liberation-fonts |
91 |
- >=media-gfx/imagemagick-6.5.9[jpeg,png] |
92 |
- >=media-libs/freetype-2:= |
93 |
- >=media-libs/libwmf-0.2.8 |
94 |
- >=media-libs/libmtp-1.1.4:= |
95 |
- virtual/libusb:1= |
96 |
- dev-qt/qtdbus:4= |
97 |
- dev-qt/qtsvg:4= |
98 |
- >=x11-misc/xdg-utils-1.0.2-r2" |
99 |
- |
100 |
-RDEPEND="${COMMON_DEPEND} |
101 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
102 |
- |
103 |
-DEPEND="${COMMON_DEPEND} |
104 |
- >=dev-python/setuptools-0.6_rc5 |
105 |
- >=virtual/podofo-build-0.8.2" |
106 |
- |
107 |
-S=${WORKDIR}/${PN} |
108 |
- |
109 |
-src_prepare() { |
110 |
- # Fix outdated version constant. |
111 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
112 |
- # -i src/calibre/constants.py || \ |
113 |
- # die "sed failed to patch constants.py" |
114 |
- |
115 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
116 |
- # calls xdg-* (bug #258938). |
117 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
118 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
119 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
120 |
- -e "s|PreserveMIMEDefaults():||" \ |
121 |
- -e "s|xdg-icon-resource install|\\0 --mode user|" \ |
122 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
123 |
- -e "s|xdg-mime install|\\0 --mode user|" \ |
124 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
125 |
- |
126 |
- # Disable unnecessary privilege dropping for bug #287067. |
127 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
128 |
- -i setup/install.py || die "sed failed to patch install.py" |
129 |
- |
130 |
- sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\ |
131 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
132 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
133 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
134 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
135 |
-'-i', 'Makefile'])" \ |
136 |
- -i setup/extensions.py || die "sed failed to patch extensions.py" |
137 |
- |
138 |
- # no_updates: do not annoy user with "new version is availible all the time |
139 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
140 |
- epatch \ |
141 |
- "${FILESDIR}/${PN}-1.20-no_updates_dialog.patch" \ |
142 |
- "${FILESDIR}/${PN}-disable_plugins.patch" |
143 |
-} |
144 |
- |
145 |
-src_install() { |
146 |
- # Bypass kbuildsycoca and update-mime-database in order to |
147 |
- # avoid sandbox violations if xdg-mime tries to call them. |
148 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
149 |
- #!${BASH} |
150 |
- exit 0 |
151 |
- EOF |
152 |
- |
153 |
- cp "${T}"/{kbuildsycoca,update-mime-database} |
154 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} |
155 |
- |
156 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
157 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
158 |
- export -n DISPLAY |
159 |
- |
160 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
161 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
162 |
- # return _parse_localename(localename) |
163 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
164 |
- # raise ValueError, 'unknown locale: %s' % localename |
165 |
- #ValueError: unknown locale: 46 |
166 |
- export -n LANGUAGE |
167 |
- |
168 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
169 |
- # variables to point to our fake temporary $HOME. |
170 |
- export HOME="${T}/fake_homedir" |
171 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
172 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
173 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
174 |
- mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" |
175 |
- |
176 |
- tc-export CC CXX |
177 |
- # Bug #334243 - respect LDFLAGS when building extensions |
178 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
179 |
- local libdir=$(get_libdir) |
180 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
181 |
- |
182 |
- export QMAKE="$(qt4_get_bindir)/qmake" |
183 |
- |
184 |
- # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
185 |
- local x |
186 |
- for x in /dev/dri/card[0-9] ; do |
187 |
- [[ -e ${x} ]] && addpredict ${x} |
188 |
- done |
189 |
- |
190 |
- dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
191 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
192 |
- "${EPREFIX}"/usr/bin/python2.7 setup.py install \ |
193 |
- --root="${D}" \ |
194 |
- --prefix="${EPREFIX}/usr" \ |
195 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
196 |
- --staging-root="${ED}usr" \ |
197 |
- --staging-libdir="${ED}usr/${libdir}" || die |
198 |
- |
199 |
- grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i || |
200 |
- die "failed to fix harcoded \$D in paths" |
201 |
- |
202 |
- # The menu entries end up here due to '--mode user' being added to |
203 |
- # xdg-* options in src_prepare. |
204 |
- dodir /usr/share/mime/packages |
205 |
- chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
206 |
- mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
207 |
- die "failed to register mime types" |
208 |
- dodir /usr/share/icons |
209 |
- mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
210 |
- die "failed to install icon files" |
211 |
- |
212 |
- domenu "${HOME}"/.local/share/applications/*.desktop || |
213 |
- die "failed to install .desktop menu files" |
214 |
- |
215 |
- dobashcomp "${ED}"usr/etc/bash_completion.d/calibre |
216 |
- rm -r "${ED}"usr/etc/bash_completion.d |
217 |
- find "${ED}"usr/etc -type d -empty -delete |
218 |
- |
219 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
220 |
- local x |
221 |
- for x in * ; do |
222 |
- [[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue |
223 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
224 |
- done |
225 |
- |
226 |
- einfo "Converting python shebangs" |
227 |
- while read -r -d $'\0' ; do |
228 |
- local shebang=$(head -n1 "$REPLY") |
229 |
- if [[ ${shebang} == "#!"*python* ]] ; then |
230 |
- sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \ |
231 |
- die "sed failed" |
232 |
- fi |
233 |
- done < <(find "${ED}" -type f -print0) |
234 |
- |
235 |
- einfo "Compiling python modules" |
236 |
- "${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \ |
237 |
- -d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die |
238 |
- |
239 |
- newinitd "${FILESDIR}"/calibre-server.init calibre-server |
240 |
- newconfd "${FILESDIR}"/calibre-server.conf calibre-server |
241 |
-} |
242 |
- |
243 |
-pkg_postinst() { |
244 |
- fdo-mime_desktop_database_update |
245 |
- fdo-mime_mime_database_update |
246 |
-} |
247 |
|
248 |
diff --git a/app-text/calibre/calibre-2.70.0.ebuild b/app-text/calibre/calibre-2.70.0.ebuild |
249 |
deleted file mode 100644 |
250 |
index 23a7e98bc3..0000000000 |
251 |
--- a/app-text/calibre/calibre-2.70.0.ebuild |
252 |
+++ /dev/null |
253 |
@@ -1,251 +0,0 @@ |
254 |
-# Copyright 1999-2016 Gentoo Foundation |
255 |
-# Distributed under the terms of the GNU General Public License v2 |
256 |
-# $Id$ |
257 |
- |
258 |
-EAPI=6 |
259 |
- |
260 |
-PYTHON_COMPAT=( python2_7 ) |
261 |
-PYTHON_REQ_USE="sqlite,ssl" |
262 |
- |
263 |
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1 |
264 |
- |
265 |
-DESCRIPTION="Ebook management application" |
266 |
-HOMEPAGE="http://calibre-ebook.com/" |
267 |
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
268 |
- |
269 |
-LICENSE=" |
270 |
- GPL-3+ |
271 |
- GPL-3 |
272 |
- GPL-2+ |
273 |
- GPL-2 |
274 |
- GPL-1+ |
275 |
- LGPL-3+ |
276 |
- LGPL-2.1+ |
277 |
- LGPL-2.1 |
278 |
- BSD |
279 |
- MIT |
280 |
- Old-MIT |
281 |
- Apache-2.0 |
282 |
- public-domain |
283 |
- || ( Artistic GPL-1+ ) |
284 |
- CC-BY-3.0 |
285 |
- OFL-1.1 |
286 |
- PSF-2 |
287 |
- unRAR |
288 |
-" |
289 |
-KEYWORDS="~amd64 ~arm ~x86" |
290 |
-SLOT="0" |
291 |
-IUSE="+udisks" |
292 |
- |
293 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
294 |
- |
295 |
-COMMON_DEPEND="${PYTHON_DEPS} |
296 |
- >=app-text/podofo-0.8.2:= |
297 |
- >=app-text/poppler-0.26.5[qt5] |
298 |
- >=dev-libs/chmlib-0.40:= |
299 |
- dev-libs/glib:2 |
300 |
- >=dev-libs/icu-4.4:= |
301 |
- >=dev-python/apsw-3.7.17[${PYTHON_USEDEP}] |
302 |
- >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
303 |
- >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
304 |
- >=dev-python/cssutils-0.9.9[${PYTHON_USEDEP}] |
305 |
- >=dev-python/dbus-python-1.2.0[${PYTHON_USEDEP}] |
306 |
- >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}] |
307 |
- >=dev-python/mechanize-0.1.11[${PYTHON_USEDEP}] |
308 |
- dev-python/netifaces[${PYTHON_USEDEP}] |
309 |
- dev-python/pillow[${PYTHON_USEDEP}] |
310 |
- dev-python/psutil[${PYTHON_USEDEP}] |
311 |
- >=dev-python/pygments-2.0.1[${PYTHON_USEDEP}] |
312 |
- >=dev-python/python-dateutil-1.4.1[${PYTHON_USEDEP}] |
313 |
- >=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
314 |
- dev-qt/qtcore:5 |
315 |
- dev-qt/qtgui:5 |
316 |
- dev-qt/qtwidgets:5 |
317 |
- media-fonts/liberation-fonts |
318 |
- >=media-gfx/imagemagick-6.5.9[jpeg,png] |
319 |
- media-libs/fontconfig |
320 |
- >=media-libs/freetype-2:= |
321 |
- >=media-libs/libmtp-1.1.5:= |
322 |
- >=media-libs/libwmf-0.2.8 |
323 |
- sys-libs/zlib |
324 |
- virtual/libusb:1= |
325 |
- virtual/python-dnspython[${PYTHON_USEDEP}] |
326 |
- x11-libs/libX11 |
327 |
- x11-libs/libXext |
328 |
- x11-libs/libXrender |
329 |
- >=x11-misc/xdg-utils-1.0.2-r2 |
330 |
- udisks? ( virtual/libudev )" |
331 |
-RDEPEND="${COMMON_DEPEND} |
332 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
333 |
-DEPEND="${COMMON_DEPEND} |
334 |
- >=dev-python/setuptools-0.6_rc5[${PYTHON_USEDEP}] |
335 |
- >=virtual/podofo-build-0.8.2 |
336 |
- virtual/pkgconfig" |
337 |
- |
338 |
-src_prepare() { |
339 |
- # no_updates: do not annoy user with "new version is availible all the time |
340 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
341 |
- eapply \ |
342 |
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
343 |
- "${FILESDIR}/${PN}-disable_plugins.patch" |
344 |
- |
345 |
- eapply_user |
346 |
- |
347 |
- # Fix outdated version constant. |
348 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
349 |
- # -i src/calibre/constants.py || \ |
350 |
- # die "sed failed to patch constants.py" |
351 |
- |
352 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
353 |
- # calls xdg-* (bug #258938). |
354 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
355 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
356 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
357 |
- -e "s|, PreserveMIMEDefaults():|:|" \ |
358 |
- -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
359 |
- -e "s|cmd\[2\]|cmd[4]|" \ |
360 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
361 |
- -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
362 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
363 |
- |
364 |
- # Disable unnecessary privilege dropping for bug #287067. |
365 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
366 |
- -i setup/install.py || die "sed failed to patch install.py" |
367 |
- |
368 |
- sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\ |
369 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
370 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
371 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
372 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
373 |
-'-i', 'Makefile'])" \ |
374 |
- -i setup/build.py || die "sed failed to patch build.py" |
375 |
- |
376 |
- # use system beautifulsoup, instead of bundled |
377 |
- rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
378 |
- || die "could not remove bundled beautifulsoup" |
379 |
- find "${S}" -type f -name \*.py -exec \ |
380 |
- sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
381 |
- || die "could not sed bundled beautifulsoup out of the source tree" |
382 |
- |
383 |
- # avoid failure of xdg tools to recognize vendor prefix |
384 |
- sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
385 |
- -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
386 |
- -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
387 |
- -i "${S}"/src/calibre/linux.py || die 'sed failed' |
388 |
-} |
389 |
- |
390 |
-src_install() { |
391 |
- # Bypass kbuildsycoca and update-mime-database in order to |
392 |
- # avoid sandbox violations if xdg-mime tries to call them. |
393 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
394 |
- #!${BASH} |
395 |
- echo $0 : $@ |
396 |
- exit 0 |
397 |
- EOF |
398 |
- |
399 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
400 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
401 |
- |
402 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
403 |
- |
404 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
405 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
406 |
- export -n DISPLAY |
407 |
- |
408 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
409 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
410 |
- # return _parse_localename(localename) |
411 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
412 |
- # raise ValueError, 'unknown locale: %s' % localename |
413 |
- #ValueError: unknown locale: 46 |
414 |
- export -n LANGUAGE |
415 |
- |
416 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
417 |
- # variables to point to our fake temporary $HOME. |
418 |
- export HOME="${T}/fake_homedir" |
419 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
420 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
421 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
422 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
423 |
- |
424 |
- tc-export CC CXX |
425 |
- # Bug #334243 - respect LDFLAGS when building extensions |
426 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
427 |
- local libdir=$(get_libdir) |
428 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
429 |
- |
430 |
- # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
431 |
- local x |
432 |
- for x in /dev/dri/card[0-9] ; do |
433 |
- [[ -e ${x} ]] && addpredict ${x} |
434 |
- done |
435 |
- |
436 |
- #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
437 |
- #dodir $(python_get_sitedir) |
438 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
439 |
- "${PYTHON}" setup.py install \ |
440 |
- --root="${D}" \ |
441 |
- --prefix="${EPREFIX}/usr" \ |
442 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
443 |
- --staging-root="${ED}usr" \ |
444 |
- --staging-libdir="${ED}usr/${libdir}" || die |
445 |
- |
446 |
- grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i || |
447 |
- die "failed to fix harcoded \$D in paths" |
448 |
- |
449 |
- # The menu entries end up here due to '--mode user' being added to |
450 |
- # xdg-* options in src_prepare. |
451 |
- dodir /usr/share/mime/packages |
452 |
- chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
453 |
- mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
454 |
- die "failed to register mime types" |
455 |
- dodir /usr/share/icons |
456 |
- mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
457 |
- die "failed to install icon files" |
458 |
- |
459 |
- domenu "${HOME}"/.local/share/applications/*.desktop || |
460 |
- die "failed to install .desktop menu files" |
461 |
- |
462 |
- find "${ED}"usr/share -type d -empty -delete |
463 |
- |
464 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
465 |
- local x |
466 |
- for x in * ; do |
467 |
- [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
468 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
469 |
- done |
470 |
- |
471 |
- einfo "Converting python shebangs" |
472 |
- python_fix_shebang "${ED}" |
473 |
- |
474 |
- einfo "Compiling python modules" |
475 |
- python_optimize "${ED}"usr/lib/calibre |
476 |
- |
477 |
- newinitd "${FILESDIR}"/calibre-server.init calibre-server |
478 |
- newconfd "${FILESDIR}"/calibre-server.conf calibre-server |
479 |
- |
480 |
- bashcomp_alias calibre \ |
481 |
- lrfviewer \ |
482 |
- calibre-debug \ |
483 |
- ebook-meta \ |
484 |
- calibre-server \ |
485 |
- ebook-viewer \ |
486 |
- ebook-polish \ |
487 |
- fetch-ebook-metadata \ |
488 |
- lrf2lrs \ |
489 |
- ebook-convert \ |
490 |
- ebook-edit \ |
491 |
- calibre-smtp \ |
492 |
- ebook-device |
493 |
- |
494 |
-} |
495 |
- |
496 |
-pkg_postinst() { |
497 |
- fdo-mime_desktop_database_update |
498 |
- fdo-mime_mime_database_update |
499 |
-} |
500 |
- |
501 |
-pkg_postrm() { |
502 |
- fdo-mime_desktop_database_update |
503 |
- fdo-mime_mime_database_update |
504 |
-} |
505 |
|
506 |
diff --git a/app-text/calibre/calibre-2.73.0.ebuild b/app-text/calibre/calibre-2.73.0.ebuild |
507 |
deleted file mode 100644 |
508 |
index 9083e7f6f7..0000000000 |
509 |
--- a/app-text/calibre/calibre-2.73.0.ebuild |
510 |
+++ /dev/null |
511 |
@@ -1,254 +0,0 @@ |
512 |
-# Copyright 1999-2016 Gentoo Foundation |
513 |
-# Distributed under the terms of the GNU General Public License v2 |
514 |
-# $Id$ |
515 |
- |
516 |
-EAPI=6 |
517 |
- |
518 |
-PYTHON_COMPAT=( python2_7 ) |
519 |
-PYTHON_REQ_USE="sqlite,ssl" |
520 |
- |
521 |
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1 |
522 |
- |
523 |
-DESCRIPTION="Ebook management application" |
524 |
-HOMEPAGE="http://calibre-ebook.com/" |
525 |
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
526 |
- |
527 |
-LICENSE=" |
528 |
- GPL-3+ |
529 |
- GPL-3 |
530 |
- GPL-2+ |
531 |
- GPL-2 |
532 |
- GPL-1+ |
533 |
- LGPL-3+ |
534 |
- LGPL-2.1+ |
535 |
- LGPL-2.1 |
536 |
- BSD |
537 |
- MIT |
538 |
- Old-MIT |
539 |
- Apache-2.0 |
540 |
- public-domain |
541 |
- || ( Artistic GPL-1+ ) |
542 |
- CC-BY-3.0 |
543 |
- OFL-1.1 |
544 |
- PSF-2 |
545 |
- unRAR |
546 |
-" |
547 |
-KEYWORDS="~amd64 ~arm ~x86" |
548 |
-SLOT="0" |
549 |
-IUSE="+udisks" |
550 |
- |
551 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
552 |
- |
553 |
-COMMON_DEPEND="${PYTHON_DEPS} |
554 |
- >=app-text/podofo-0.8.2:= |
555 |
- >=app-text/poppler-0.26.5[qt5] |
556 |
- >=dev-libs/chmlib-0.40:= |
557 |
- dev-libs/glib:2 |
558 |
- >=dev-libs/icu-4.4:= |
559 |
- >=dev-python/apsw-3.7.17[${PYTHON_USEDEP}] |
560 |
- >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
561 |
- >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
562 |
- >=dev-python/cssutils-0.9.9[${PYTHON_USEDEP}] |
563 |
- >=dev-python/dbus-python-1.2.0[${PYTHON_USEDEP}] |
564 |
- >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}] |
565 |
- >=dev-python/mechanize-0.1.11[${PYTHON_USEDEP}] |
566 |
- dev-python/netifaces[${PYTHON_USEDEP}] |
567 |
- dev-python/pillow[${PYTHON_USEDEP}] |
568 |
- dev-python/psutil[${PYTHON_USEDEP}] |
569 |
- >=dev-python/pygments-2.0.1[${PYTHON_USEDEP}] |
570 |
- >=dev-python/python-dateutil-1.4.1[${PYTHON_USEDEP}] |
571 |
- >=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
572 |
- dev-qt/qtcore:5 |
573 |
- dev-qt/qtgui:5 |
574 |
- dev-qt/qtwidgets:5 |
575 |
- media-fonts/liberation-fonts |
576 |
- >=media-gfx/imagemagick-6.5.9[jpeg,png] |
577 |
- media-libs/fontconfig |
578 |
- >=media-libs/freetype-2:= |
579 |
- >=media-libs/libmtp-1.1.5:= |
580 |
- >=media-libs/libwmf-0.2.8 |
581 |
- sys-libs/zlib |
582 |
- virtual/libusb:1= |
583 |
- virtual/python-dnspython[${PYTHON_USEDEP}] |
584 |
- x11-libs/libX11 |
585 |
- x11-libs/libXext |
586 |
- x11-libs/libXrender |
587 |
- >=x11-misc/xdg-utils-1.0.2-r2 |
588 |
- udisks? ( virtual/libudev )" |
589 |
-RDEPEND="${COMMON_DEPEND} |
590 |
- udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
591 |
-DEPEND="${COMMON_DEPEND} |
592 |
- >=dev-python/setuptools-0.6_rc5[${PYTHON_USEDEP}] |
593 |
- >=virtual/podofo-build-0.8.2 |
594 |
- virtual/pkgconfig" |
595 |
- |
596 |
-src_prepare() { |
597 |
- # no_updates: do not annoy user with "new version is availible all the time |
598 |
- # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
599 |
- eapply \ |
600 |
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
601 |
- "${FILESDIR}/${PN}-disable_plugins.patch" |
602 |
- |
603 |
- eapply_user |
604 |
- |
605 |
- # Fix outdated version constant. |
606 |
- #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
607 |
- # -i src/calibre/constants.py || \ |
608 |
- # die "sed failed to patch constants.py" |
609 |
- |
610 |
- # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
611 |
- # calls xdg-* (bug #258938). |
612 |
- sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
613 |
- -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
614 |
- -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
615 |
- -e "s|, PreserveMIMEDefaults():|:|" \ |
616 |
- -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
617 |
- -e "s|cmd\[2\]|cmd[4]|" \ |
618 |
- -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
619 |
- -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
620 |
- -i src/calibre/linux.py || die "sed failed to patch linux.py" |
621 |
- |
622 |
- # Disable unnecessary privilege dropping for bug #287067. |
623 |
- sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
624 |
- -i setup/install.py || die "sed failed to patch install.py" |
625 |
- |
626 |
- sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\ |
627 |
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
628 |
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
629 |
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
630 |
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
631 |
-'-i', 'Makefile'])" \ |
632 |
- -i setup/build.py || die "sed failed to patch build.py" |
633 |
- |
634 |
- # use system beautifulsoup, instead of bundled |
635 |
- rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
636 |
- || die "could not remove bundled beautifulsoup" |
637 |
- find "${S}" -type f -name \*.py -exec \ |
638 |
- sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
639 |
- || die "could not sed bundled beautifulsoup out of the source tree" |
640 |
- |
641 |
- # avoid failure of xdg tools to recognize vendor prefix |
642 |
- sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
643 |
- -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
644 |
- -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
645 |
- -i "${S}"/src/calibre/linux.py || die 'sed failed' |
646 |
- |
647 |
- # don't create/install uninstaller |
648 |
- sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die |
649 |
-} |
650 |
- |
651 |
-src_install() { |
652 |
- # Bypass kbuildsycoca and update-mime-database in order to |
653 |
- # avoid sandbox violations if xdg-mime tries to call them. |
654 |
- cat - > "${T}/kbuildsycoca" <<-EOF |
655 |
- #!${BASH} |
656 |
- echo $0 : $@ |
657 |
- exit 0 |
658 |
- EOF |
659 |
- |
660 |
- cp "${T}"/{kbuildsycoca,update-mime-database} || die |
661 |
- chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
662 |
- |
663 |
- export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
664 |
- |
665 |
- # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
666 |
- # violation with kbuildsycoca as in bug #287067, comment #13. |
667 |
- export -n DISPLAY |
668 |
- |
669 |
- # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
670 |
- # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
671 |
- # return _parse_localename(localename) |
672 |
- # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
673 |
- # raise ValueError, 'unknown locale: %s' % localename |
674 |
- #ValueError: unknown locale: 46 |
675 |
- export -n LANGUAGE |
676 |
- |
677 |
- # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
678 |
- # variables to point to our fake temporary $HOME. |
679 |
- export HOME="${T}/fake_homedir" |
680 |
- export XDG_CONFIG_HOME="${HOME}/.config" |
681 |
- export XDG_DATA_HOME="${HOME}/.local/share" |
682 |
- export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
683 |
- mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
684 |
- |
685 |
- tc-export CC CXX |
686 |
- # Bug #334243 - respect LDFLAGS when building extensions |
687 |
- export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
688 |
- local libdir=$(get_libdir) |
689 |
- [[ -n $libdir ]] || die "get_libdir returned an empty string" |
690 |
- |
691 |
- # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
692 |
- local x |
693 |
- for x in /dev/dri/card[0-9] ; do |
694 |
- [[ -e ${x} ]] && addpredict ${x} |
695 |
- done |
696 |
- |
697 |
- #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
698 |
- #dodir $(python_get_sitedir) |
699 |
- PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
700 |
- "${PYTHON}" setup.py install \ |
701 |
- --root="${D}" \ |
702 |
- --prefix="${EPREFIX}/usr" \ |
703 |
- --libdir="${EPREFIX}/usr/${libdir}" \ |
704 |
- --staging-root="${ED}usr" \ |
705 |
- --staging-libdir="${ED}usr/${libdir}" || die |
706 |
- |
707 |
- #grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i || |
708 |
- # die "failed to fix harcoded \$D in paths" |
709 |
- |
710 |
- # The menu entries end up here due to '--mode user' being added to |
711 |
- # xdg-* options in src_prepare. |
712 |
- dodir /usr/share/mime/packages |
713 |
- chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
714 |
- mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
715 |
- die "failed to register mime types" |
716 |
- dodir /usr/share/icons |
717 |
- mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
718 |
- die "failed to install icon files" |
719 |
- |
720 |
- domenu "${HOME}"/.local/share/applications/*.desktop || |
721 |
- die "failed to install .desktop menu files" |
722 |
- |
723 |
- find "${ED}"usr/share -type d -empty -delete |
724 |
- |
725 |
- cd "${ED}"/usr/share/calibre/fonts/liberation || die |
726 |
- local x |
727 |
- for x in * ; do |
728 |
- [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
729 |
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
730 |
- done |
731 |
- |
732 |
- einfo "Converting python shebangs" |
733 |
- python_fix_shebang "${ED}" |
734 |
- |
735 |
- einfo "Compiling python modules" |
736 |
- python_optimize "${ED}"usr/lib/calibre |
737 |
- |
738 |
- newinitd "${FILESDIR}"/calibre-server.init calibre-server |
739 |
- newconfd "${FILESDIR}"/calibre-server.conf calibre-server |
740 |
- |
741 |
- bashcomp_alias calibre \ |
742 |
- lrfviewer \ |
743 |
- calibre-debug \ |
744 |
- ebook-meta \ |
745 |
- calibre-server \ |
746 |
- ebook-viewer \ |
747 |
- ebook-polish \ |
748 |
- fetch-ebook-metadata \ |
749 |
- lrf2lrs \ |
750 |
- ebook-convert \ |
751 |
- ebook-edit \ |
752 |
- calibre-smtp \ |
753 |
- ebook-device |
754 |
- |
755 |
-} |
756 |
- |
757 |
-pkg_postinst() { |
758 |
- fdo-mime_desktop_database_update |
759 |
- fdo-mime_mime_database_update |
760 |
-} |
761 |
- |
762 |
-pkg_postrm() { |
763 |
- fdo-mime_desktop_database_update |
764 |
- fdo-mime_mime_database_update |
765 |
-} |