1 |
commit: 8496281530e836a083bf0c920f104e3ee3acb23d |
2 |
Author: Gerion Entrup <gerion.entrup <AT> flump <DOT> de> |
3 |
AuthorDate: Fri Jun 22 14:37:26 2018 +0000 |
4 |
Commit: gerion <gerion.entrup <AT> flump <DOT> de> |
5 |
CommitDate: Fri Jun 22 14:37:26 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/user/gerislay.git/commit/?id=84962815 |
7 |
|
8 |
add calibre 3.26.1 |
9 |
|
10 |
app-text/calibre/Manifest | 10 + |
11 |
app-text/calibre/calibre-3.26.1.ebuild | 293 +++++++++++++++++++++ |
12 |
...libre-2.83.0-lzxd-bounds-error-bug-540596.patch | 37 +++ |
13 |
.../files/calibre-2.9.0-no_updates_dialog.patch | 27 ++ |
14 |
.../calibre/files/calibre-disable_plugins.patch | 17 ++ |
15 |
app-text/calibre/files/calibre-server-3.conf | 13 + |
16 |
app-text/calibre/files/calibre-server-3.init | 58 ++++ |
17 |
app-text/calibre/files/calibre-server.conf | 13 + |
18 |
app-text/calibre/files/calibre-server.init | 58 ++++ |
19 |
app-text/calibre/metadata.xml | 13 + |
20 |
10 files changed, 539 insertions(+) |
21 |
|
22 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..b90e137 |
25 |
--- /dev/null |
26 |
+++ b/app-text/calibre/Manifest |
27 |
@@ -0,0 +1,10 @@ |
28 |
+AUX calibre-2.83.0-lzxd-bounds-error-bug-540596.patch 1296 BLAKE2B a600a8777868b7f73c95d62de9097382cb1d3e076ea756b589811f5e33aa86f1724f93177d82247132a85779ff82960f178cc325b497f8b7f1391ff113729c69 SHA512 fba16c95a69b38113d4331faceae4a81f2319ae1631a03662bd3483ad6f1b687d16db28f9df019990a3bc6918c75f4a4492ca7ef772168a575cb06ff0761bddf |
29 |
+AUX calibre-2.9.0-no_updates_dialog.patch 1661 BLAKE2B c75fc49a621e8dbd16ee1bad748110399cf09a404b4a905d3f723bac1827787e4749f464ba026700b6e5b3cc0ee646a92de00f1f58d10cf12dc9bc91195ee8b6 SHA512 9663b95ed64bdc2bc40692922384d1c6073177eee58a49c412883c4d2ae098e4e0b4ea51b80443108b7c0c3e4f3fda60c00fc3be4d0b62a5d79d982697927235 |
30 |
+AUX calibre-disable_plugins.patch 1042 BLAKE2B 92a56016c2c54f1b156bc91031420594445545b98b701f7cce99cf4bb86847eebad1ccebdc20a0d1b67f9fa88a9250fc4926d7c04cb36405323388b3171cf502 SHA512 c152ddd92728a89db10c75a4d00a968bf119bef68da8b9116c76827e3cdc8f8a7e5c45fbb973f6ca8db1f79e461518351ce2d47e5e059c282f36d2df499d1629 |
31 |
+AUX calibre-server-3.conf 541 BLAKE2B 06593633721e6adf2cf2077dffa83953eea46ccdcdc857ad468a9b74788326e9424f6ab9058be344dbbac8e49d343f5a1e53ddb486f2018b77319a7f8f713cf4 SHA512 12ef793a5b6ffd4413f780a13cad63927a95f15d17d85d4229eb5005ead68e51779abb822f9898ab5ae8c2094affeec1f9e85c34f109499739e6726b7641542a |
32 |
+AUX calibre-server-3.init 1796 BLAKE2B f87d785d6f6fc10fa648d40944ec8538027854bb872d9a3be6b5b35b0abf3cda1e4e93874a9422914da5eb4287f193459733956e3f1e25e61bec0c214c552c99 SHA512 88110ded1b9c6cf8d3bfc3d5889654f77578f9d299e88daea9023767b930082e00fbddbb92a6e43c46d900248f3684232d93396ec1d0e784c7ec14b44783f98a |
33 |
+AUX calibre-server.conf 523 BLAKE2B a9fb65a327656f9b2f54eab27dcaf2cdfbcbe5f0d637204ea39f891c515ae899da156098609bc99398354337524843afbf45409bbb1098605f293661bb8381e7 SHA512 4595786d9b6ed7662a1124e8acc32e03e0149f614a07890f9df08d05811a1b8de51cc33cc1bfbf30b072c7ad75dc3b8247e9de53d20ee2b45017cb4160437058 |
34 |
+AUX calibre-server.init 1811 BLAKE2B fe22257128896d4299c5d5edab6ac63cdcf79da483f4afc49b0d1649b17599389dd4b9f88c35a964e289cbe6d961136f1e5760a2244137c404e573510899bd60 SHA512 760aa7a8f51b23b116ba07749855737869ff2313f0528d67e5a46bc362e5c0a04a7e1f46c32dd6e82add4fa5dc41d397db32dbd1a09c912008e0890d1a133eeb |
35 |
+DIST calibre-3.26.1.tar.xz 39109660 BLAKE2B 0e98c273b8a5dfafea7a7027de3f83ad25ab835edadedf78b7e9bc356bcac8937d915944f2ab6503b414c49b4e792e090e7bd2433a4e86373bf115720ed78b0a SHA512 893e36b101defaca29281b4bd072aafc1c4cb20a9cd3ee06a0b68fbe6b39cab34952799939ac4f54c77148c87861c5ab4ddff84f5ec8c2274ae7fa6424259ff5 |
36 |
+EBUILD calibre-3.26.1.ebuild 9280 BLAKE2B ef7557d2f7416658a93850dd09766fbb2e784c512c8fa7296137df0b0737afc151ba22c285fa2b4de49b726cdf3e58a1956757fccc9295ce1b5e40f5c2b615cd SHA512 035dc539a854fa30d2216c6bb66b69f5878c6f1e34cd05a6c4d50afbe00aa15e6450666961201abbff3317febea405ac28f8e11d4ad7ab392eb4327aff34196e |
37 |
+MISC metadata.xml 382 BLAKE2B 87fa7e63a6ed7a4ea55247b362288b43f7edd312cc3085bb8c1b947402ae4aa0df01fac4f6646d260653ff8af7fe28d3dabb8a213dbf3e206181b69835b33d5f SHA512 8503e0a4a48d93682c386eb1d6507b4b26585afc9d62b7cd52bc00b457a887bd17422a03669ff404570ff7f5ff6f0bba14ee935979f8b54722870d6620097de5 |
38 |
|
39 |
diff --git a/app-text/calibre/calibre-3.26.1.ebuild b/app-text/calibre/calibre-3.26.1.ebuild |
40 |
new file mode 100644 |
41 |
index 0000000..c8832bf |
42 |
--- /dev/null |
43 |
+++ b/app-text/calibre/calibre-3.26.1.ebuild |
44 |
@@ -0,0 +1,293 @@ |
45 |
+# Copyright 1999-2018 Gentoo Foundation |
46 |
+# Distributed under the terms of the GNU General Public License v2 |
47 |
+ |
48 |
+EAPI=6 |
49 |
+ |
50 |
+PYTHON_COMPAT=( python2_7 ) |
51 |
+PYTHON_REQ_USE="sqlite,ssl" |
52 |
+ |
53 |
+inherit eutils bash-completion-r1 gnome2-utils multilib toolchain-funcs python-single-r1 xdg-utils |
54 |
+ |
55 |
+DESCRIPTION="Ebook management application" |
56 |
+HOMEPAGE="https://calibre-ebook.com/" |
57 |
+SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
58 |
+ |
59 |
+LICENSE=" |
60 |
+ GPL-3+ |
61 |
+ GPL-3 |
62 |
+ GPL-2+ |
63 |
+ GPL-2 |
64 |
+ GPL-1+ |
65 |
+ LGPL-3+ |
66 |
+ LGPL-2.1+ |
67 |
+ LGPL-2.1 |
68 |
+ BSD |
69 |
+ MIT |
70 |
+ Old-MIT |
71 |
+ Apache-2.0 |
72 |
+ public-domain |
73 |
+ || ( Artistic GPL-1+ ) |
74 |
+ CC-BY-3.0 |
75 |
+ OFL-1.1 |
76 |
+ PSF-2 |
77 |
+ unRAR |
78 |
+" |
79 |
+KEYWORDS="~amd64" |
80 |
+SLOT="0" |
81 |
+IUSE="ios +udisks" |
82 |
+ |
83 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
84 |
+ |
85 |
+COMMON_DEPEND="${PYTHON_DEPS} |
86 |
+ >=app-text/podofo-0.8.2:= |
87 |
+ >=app-text/poppler-0.26.5[qt5] |
88 |
+ >=dev-libs/chmlib-0.40:= |
89 |
+ dev-libs/glib:2= |
90 |
+ >=dev-libs/icu-57.1:= |
91 |
+ dev-libs/libinput:= |
92 |
+ >=dev-python/apsw-3.13.0[${PYTHON_USEDEP}] |
93 |
+ >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
94 |
+ dev-python/chardet[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
96 |
+ >=dev-python/cssutils-1.0.1[${PYTHON_USEDEP}] |
97 |
+ >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}] |
98 |
+ >=dev-libs/dbus-glib-0.106 |
99 |
+ >=sys-apps/dbus-1.10.8 |
100 |
+ dev-python/html5-parser[${PYTHON_USEDEP}] |
101 |
+ >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}] |
102 |
+ >=dev-python/mechanize-0.2.5[${PYTHON_USEDEP}] |
103 |
+ dev-python/msgpack[${PYTHON_USEDEP}] |
104 |
+ dev-python/netifaces[${PYTHON_USEDEP}] |
105 |
+ dev-python/pillow[${PYTHON_USEDEP}] |
106 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
107 |
+ >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}] |
108 |
+ >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
109 |
+ >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
110 |
+ dev-python/regex[${PYTHON_USEDEP}] |
111 |
+ dev-qt/qtcore:5= |
112 |
+ dev-qt/qtdbus:5= |
113 |
+ dev-qt/qtgui:5= |
114 |
+ dev-qt/qtwidgets:5= |
115 |
+ dev-util/desktop-file-utils |
116 |
+ dev-util/gtk-update-icon-cache |
117 |
+ media-fonts/liberation-fonts |
118 |
+ media-libs/fontconfig:= |
119 |
+ >=media-libs/freetype-2:= |
120 |
+ >=media-libs/libmtp-1.1.11:= |
121 |
+ >=media-libs/libwmf-0.2.8 |
122 |
+ >=media-gfx/optipng-0.7.6 |
123 |
+ sys-libs/zlib:= |
124 |
+ virtual/libusb:1= |
125 |
+ virtual/python-dnspython[${PYTHON_USEDEP}] |
126 |
+ x11-libs/libxkbcommon:= |
127 |
+ x11-libs/libX11:= |
128 |
+ x11-libs/libXext:= |
129 |
+ x11-libs/libXrender:= |
130 |
+ x11-misc/shared-mime-info |
131 |
+ >=x11-misc/xdg-utils-1.0.2-r2 |
132 |
+ ios? ( |
133 |
+ >=app-pda/usbmuxd-1.0.8 |
134 |
+ >=app-pda/libimobiledevice-1.2.0 |
135 |
+ ) |
136 |
+ udisks? ( virtual/libudev )" |
137 |
+RDEPEND="${COMMON_DEPEND} |
138 |
+ udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
139 |
+DEPEND="${COMMON_DEPEND} |
140 |
+ >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
141 |
+ >=virtual/podofo-build-0.9.4 |
142 |
+ virtual/pkgconfig" |
143 |
+ |
144 |
+pkg_pretend() { |
145 |
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then |
146 |
+ eerror "Calibre cannot be built with this version of gcc." |
147 |
+ eerror "You need at least gcc-6.0" |
148 |
+ die "Your C compiler is too old for this package." |
149 |
+ fi |
150 |
+} |
151 |
+ |
152 |
+src_prepare() { |
153 |
+ # no_updates: do not annoy user with "new version is availible all the time |
154 |
+ # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
155 |
+ eapply \ |
156 |
+ "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
157 |
+ "${FILESDIR}/${PN}-disable_plugins.patch" |
158 |
+ |
159 |
+ eapply_user |
160 |
+ |
161 |
+ # Fix outdated version constant. |
162 |
+ #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
163 |
+ # -i src/calibre/constants.py || \ |
164 |
+ # die "sed failed to patch constants.py" |
165 |
+ |
166 |
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
167 |
+ # calls xdg-* (bug #258938). |
168 |
+ sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
169 |
+ -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
170 |
+ -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
171 |
+ -e "s|, PreserveMIMEDefaults():|:|" \ |
172 |
+ -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
173 |
+ -e "s|cmd\[2\]|cmd[4]|" \ |
174 |
+ -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
175 |
+ -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
176 |
+ -i src/calibre/linux.py || die "sed failed to patch linux.py" |
177 |
+ |
178 |
+ # Disable unnecessary privilege dropping for bug #287067. |
179 |
+ sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
180 |
+ -i setup/install.py || die "sed failed to patch install.py" |
181 |
+ |
182 |
+ sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
183 |
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
184 |
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
185 |
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
186 |
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
187 |
+'-i', 'Makefile'])" \ |
188 |
+ -i setup/build.py || die "sed failed to patch build.py" |
189 |
+ |
190 |
+ # use system beautifulsoup, instead of bundled |
191 |
+ rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
192 |
+ || die "could not remove bundled beautifulsoup" |
193 |
+ find "${S}" -type f -name \*.py -exec \ |
194 |
+ sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
195 |
+ || die "could not sed bundled beautifulsoup out of the source tree" |
196 |
+ |
197 |
+ # avoid failure of xdg tools to recognize vendor prefix |
198 |
+ sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
199 |
+ -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
200 |
+ -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
201 |
+ -i "${S}"/src/calibre/linux.py || die 'sed failed' |
202 |
+ |
203 |
+ # don't create/install uninstaller |
204 |
+ sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die |
205 |
+} |
206 |
+ |
207 |
+src_install() { |
208 |
+ # Bypass kbuildsycoca and update-mime-database in order to |
209 |
+ # avoid sandbox violations if xdg-mime tries to call them. |
210 |
+ cat - > "${T}/kbuildsycoca" <<-EOF |
211 |
+ #!${BASH} |
212 |
+ echo $0 : $@ |
213 |
+ exit 0 |
214 |
+ EOF |
215 |
+ |
216 |
+ cp "${T}"/{kbuildsycoca,update-mime-database} || die |
217 |
+ chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
218 |
+ |
219 |
+ export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
220 |
+ |
221 |
+ # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
222 |
+ # violation with kbuildsycoca as in bug #287067, comment #13. |
223 |
+ export -n DISPLAY |
224 |
+ |
225 |
+ # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
226 |
+ # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
227 |
+ # return _parse_localename(localename) |
228 |
+ # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
229 |
+ # raise ValueError, 'unknown locale: %s' % localename |
230 |
+ #ValueError: unknown locale: 46 |
231 |
+ export -n LANGUAGE |
232 |
+ |
233 |
+ # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
234 |
+ # variables to point to our fake temporary $HOME. |
235 |
+ export HOME="${T}/fake_homedir" |
236 |
+ export XDG_CONFIG_HOME="${HOME}/.config" |
237 |
+ export XDG_DATA_HOME="${HOME}/.local/share" |
238 |
+ export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
239 |
+ mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
240 |
+ |
241 |
+ tc-export CC CXX |
242 |
+ # Bug #334243 - respect LDFLAGS when building extensions |
243 |
+ export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
244 |
+ local libdir=$(get_libdir) |
245 |
+ [[ -n $libdir ]] || die "get_libdir returned an empty string" |
246 |
+ |
247 |
+ # Bug #472690 - Avoid sandbox violation for /dev/dri/card0. |
248 |
+ local x |
249 |
+ for x in /dev/dri/card[0-9] ; do |
250 |
+ [[ -e ${x} ]] && addpredict ${x} |
251 |
+ done |
252 |
+ |
253 |
+ #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
254 |
+ #dodir $(python_get_sitedir) |
255 |
+ PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
256 |
+ "${PYTHON}" setup.py install \ |
257 |
+ --root="${D}" \ |
258 |
+ --prefix="${EPREFIX}/usr" \ |
259 |
+ --libdir="${EPREFIX}/usr/${libdir}" \ |
260 |
+ --staging-root="${ED}usr" \ |
261 |
+ --staging-libdir="${ED}usr/${libdir}" || die |
262 |
+ |
263 |
+ # The menu entries end up here due to '--mode user' being added to |
264 |
+ # xdg-* options in src_prepare. |
265 |
+ dodir /usr/share/mime/packages |
266 |
+ chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
267 |
+ mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
268 |
+ die "failed to register mime types" |
269 |
+ dodir /usr/share/icons |
270 |
+ mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
271 |
+ die "failed to install icon files" |
272 |
+ |
273 |
+ domenu "${HOME}"/.local/share/applications/*.desktop || |
274 |
+ die "failed to install .desktop menu files" |
275 |
+ |
276 |
+ find "${ED}"usr/share -type d -empty -delete |
277 |
+ |
278 |
+ cd "${ED}"/usr/share/calibre/fonts/liberation || die |
279 |
+ local x |
280 |
+ for x in * ; do |
281 |
+ [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
282 |
+ ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
283 |
+ done |
284 |
+ |
285 |
+ einfo "Converting python shebangs" |
286 |
+ python_fix_shebang "${ED}" |
287 |
+ |
288 |
+ einfo "Compiling python modules" |
289 |
+ python_optimize "${ED}"usr/lib/calibre |
290 |
+ |
291 |
+ newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
292 |
+ newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
293 |
+ |
294 |
+ bashcomp_alias calibre \ |
295 |
+ lrfviewer \ |
296 |
+ calibre-debug \ |
297 |
+ ebook-meta \ |
298 |
+ calibre-server \ |
299 |
+ ebook-viewer \ |
300 |
+ ebook-polish \ |
301 |
+ fetch-ebook-metadata \ |
302 |
+ lrf2lrs \ |
303 |
+ ebook-convert \ |
304 |
+ ebook-edit \ |
305 |
+ calibre-smtp \ |
306 |
+ ebook-device |
307 |
+ |
308 |
+} |
309 |
+ |
310 |
+pkg_preinst() { |
311 |
+ gnome2_icon_savelist |
312 |
+ # Indentify stray directories from upstream's "Binary install" |
313 |
+ # method (see bug 622728). |
314 |
+ CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
315 |
+ CALIBRE_LIB_CONTENT=$(for x in "${ED%/}${CALIBRE_LIB_DIR}"/*; do |
316 |
+ printf -- "${x##*/} "; done) || die "Failed to list ${ED%/}${CALIBRE_LIB_DIR}" |
317 |
+} |
318 |
+ |
319 |
+pkg_postinst() { |
320 |
+ [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
321 |
+ local x |
322 |
+ for x in "${EROOT%/}${CALIBRE_LIB_DIR}"/*; do |
323 |
+ if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
324 |
+ elog "Purging '${x}'" |
325 |
+ rm -rf "${x}" |
326 |
+ fi |
327 |
+ done |
328 |
+ xdg_desktop_database_update |
329 |
+ xdg_mimeinfo_database_update |
330 |
+ gnome2_icon_cache_update |
331 |
+} |
332 |
+ |
333 |
+pkg_postrm() { |
334 |
+ xdg_desktop_database_update |
335 |
+ xdg_mimeinfo_database_update |
336 |
+ gnome2_icon_cache_update |
337 |
+} |
338 |
|
339 |
diff --git a/app-text/calibre/files/calibre-2.83.0-lzxd-bounds-error-bug-540596.patch b/app-text/calibre/files/calibre-2.83.0-lzxd-bounds-error-bug-540596.patch |
340 |
new file mode 100644 |
341 |
index 0000000..5f7d5a4 |
342 |
--- /dev/null |
343 |
+++ b/app-text/calibre/files/calibre-2.83.0-lzxd-bounds-error-bug-540596.patch |
344 |
@@ -0,0 +1,37 @@ |
345 |
+From f335c8719b224d3ca7a967b6e91cebd5b26684fe Mon Sep 17 00:00:00 2001 |
346 |
+From: Zac Medico <zmedico@g.o> |
347 |
+Date: Sun, 23 Apr 2017 16:13:00 -0700 |
348 |
+Subject: [PATCH] Fix bounds error in lzxd_static_init |
349 |
+ |
350 |
+https://bugs.gentoo.org/show_bug.cgi?id=540596 |
351 |
+https://github.com/kovidgoyal/calibre/pull/650 |
352 |
+ |
353 |
+This includes the changes from the following upstream commits: |
354 |
+ |
355 |
+https://github.com/kyz/libmspack/commit/6a42ddd1d472afeaf0f7da91e16b60ab2063fb92 |
356 |
+https://github.com/kyz/libmspack/commit/ce3cc03aa500dd9c0b6b820f9519f6b6b9dede05 |
357 |
+--- |
358 |
+ src/calibre/utils/lzx/lzxd.c | 3 ++- |
359 |
+ 1 file changed, 2 insertions(+), 1 deletion(-) |
360 |
+ |
361 |
+diff --git a/src/calibre/utils/lzx/lzxd.c b/src/calibre/utils/lzx/lzxd.c |
362 |
+index e683a9e..c531aaa 100644 |
363 |
+--- a/src/calibre/utils/lzx/lzxd.c |
364 |
++++ b/src/calibre/utils/lzx/lzxd.c |
365 |
+@@ -357,11 +357,12 @@ static unsigned char extra_bits[51]; |
366 |
+ static void lzxd_static_init(void) { |
367 |
+ int i, j; |
368 |
+ |
369 |
+- for (i = 0, j = 0; i < 51; i += 2) { |
370 |
++ for (i = 0, j = 0; i < 50; i += 2) { |
371 |
+ extra_bits[i] = j; /* 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7... */ |
372 |
+ extra_bits[i+1] = j; |
373 |
+ if ((i != 0) && (j < 17)) j++; /* 0,0,1,2,3,4...15,16,17,17,17,17... */ |
374 |
+ } |
375 |
++ extra_bits[50] = 17; |
376 |
+ |
377 |
+ for (i = 0, j = 0; i < 51; i++) { |
378 |
+ position_base[i] = j; /* 0,1,2,3,4,6,8,12,16,24,32,... */ |
379 |
+-- |
380 |
+2.10.2 |
381 |
+ |
382 |
|
383 |
diff --git a/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch b/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch |
384 |
new file mode 100644 |
385 |
index 0000000..4d37c3b |
386 |
--- /dev/null |
387 |
+++ b/app-text/calibre/files/calibre-2.9.0-no_updates_dialog.patch |
388 |
@@ -0,0 +1,27 @@ |
389 |
+diff -burN calibre-2.9.0.orig/src/calibre/gui2/main.py calibre-2.9.0/src/calibre/gui2/main.py |
390 |
+--- calibre-2.9.0.orig/src/calibre/gui2/main.py 2014-11-09 20:09:54.081231882 +0800 |
391 |
++++ calibre-2.9.0/src/calibre/gui2/main.py 2014-11-09 20:15:48.193033844 +0800 |
392 |
+@@ -37,8 +37,9 @@ |
393 |
+ help=_('Start minimized to system tray.')) |
394 |
+ parser.add_option('-v', '--verbose', default=0, action='count', |
395 |
+ help=_('Ignored, do not use. Present only for legacy reasons')) |
396 |
+- parser.add_option('--no-update-check', default=False, action='store_true', |
397 |
+- help=_('Do not check for updates')) |
398 |
++ parser.add_option('--update-check', dest='no_update_check', default=True, |
399 |
++ action='store_false', |
400 |
++ help=_('Check for updates')) |
401 |
+ parser.add_option('--ignore-plugins', default=False, action='store_true', |
402 |
+ help=_('Ignore custom plugins, useful if you installed a plugin' |
403 |
+ ' that is preventing calibre from starting')) |
404 |
+diff -burN calibre-2.9.0.orig/src/calibre/gui2/update.py calibre-2.9.0/src/calibre/gui2/update.py |
405 |
+--- calibre-2.9.0.orig/src/calibre/gui2/update.py 2014-11-09 20:09:54.082231864 +0800 |
406 |
++++ calibre-2.9.0/src/calibre/gui2/update.py 2014-11-09 20:17:49.954767115 +0800 |
407 |
+@@ -154,6 +154,8 @@ |
408 |
+ self.update_checker.signal.update_found.connect(self.update_found, |
409 |
+ type=Qt.QueuedConnection) |
410 |
+ self.update_checker.start() |
411 |
++ else: |
412 |
++ self.update_checker = None |
413 |
+ |
414 |
+ def recalc_update_label(self, number_of_plugin_updates): |
415 |
+ self.update_found(self.last_newest_calibre_version, number_of_plugin_updates) |
416 |
|
417 |
diff --git a/app-text/calibre/files/calibre-disable_plugins.patch b/app-text/calibre/files/calibre-disable_plugins.patch |
418 |
new file mode 100644 |
419 |
index 0000000..9ef1dd0 |
420 |
--- /dev/null |
421 |
+++ b/app-text/calibre/files/calibre-disable_plugins.patch |
422 |
@@ -0,0 +1,17 @@ |
423 |
+Description: Disable plugin dialog. It uses a totally non-authenticated and non-trusted way of installing arbitrary code. |
424 |
+Author: Martin Pitt <mpitt@××××××.org> |
425 |
+Bug-Debian: http://bugs.debian.org/640026 |
426 |
+ |
427 |
+Index: calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py |
428 |
+=================================================================== |
429 |
+--- calibre-0.8.29+dfsg.orig/src/calibre/gui2/actions/preferences.py 2011-12-16 05:49:14.000000000 +0100 |
430 |
++++ calibre-0.8.29+dfsg/src/calibre/gui2/actions/preferences.py 2011-12-20 19:29:04.798468930 +0100 |
431 |
+@@ -28,8 +28,6 @@ |
432 |
+ pm.addAction(QIcon(I('config.png')), _('Preferences'), self.do_config) |
433 |
+ cm('welcome wizard', _('Run welcome wizard'), |
434 |
+ icon='wizard.png', triggered=self.gui.run_wizard) |
435 |
+- cm('plugin updater', _('Get plugins to enhance calibre'), |
436 |
+- icon='plugins/plugin_updater.png', triggered=self.get_plugins) |
437 |
+ if not DEBUG: |
438 |
+ pm.addSeparator() |
439 |
+ cm('restart', _('Restart in debug mode'), icon='debug.png', |
440 |
|
441 |
diff --git a/app-text/calibre/files/calibre-server-3.conf b/app-text/calibre/files/calibre-server-3.conf |
442 |
new file mode 100644 |
443 |
index 0000000..bb456e8 |
444 |
--- /dev/null |
445 |
+++ b/app-text/calibre/files/calibre-server-3.conf |
446 |
@@ -0,0 +1,13 @@ |
447 |
+# /etc/conf.d/calibre-server |
448 |
+# Change this to the user you want to run calibre-server as. |
449 |
+# You may specify a group too, after a colon |
450 |
+# NOTE: This must be set and not to root! |
451 |
+CALIBRE_USER= |
452 |
+ |
453 |
+# Set the path of the library to serve. |
454 |
+# Defaults to the default location for CALIBRE_USER. |
455 |
+#CALIBRE_LIBRARY='<user home directory>/Calibre Library' |
456 |
+ |
457 |
+# Extra options to pass to calibre-server. |
458 |
+# See the calibre-server man page for more options. |
459 |
+#CALIBRE_SERVER_OPTS="--userdb /srv/calibre/users.sqlite --enable-auth --worker-count 10 --port 8080" |
460 |
|
461 |
diff --git a/app-text/calibre/files/calibre-server-3.init b/app-text/calibre/files/calibre-server-3.init |
462 |
new file mode 100644 |
463 |
index 0000000..049d3e4 |
464 |
--- /dev/null |
465 |
+++ b/app-text/calibre/files/calibre-server-3.init |
466 |
@@ -0,0 +1,58 @@ |
467 |
+#!/sbin/openrc-run |
468 |
+# Copyright 1999-2012 Gentoo Foundation |
469 |
+# Distributed under the terms of the GNU General Public License, v2 or later |
470 |
+ |
471 |
+depend() { |
472 |
+ need net |
473 |
+ need localmount |
474 |
+ after bootmisc |
475 |
+} |
476 |
+ |
477 |
+checkconfig() { |
478 |
+ if [ "${CALIBRE_USER}" = "" -o "${CALIBRE_USER}" = "root" ] ; then |
479 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
480 |
+ eerror "You have to specify a user to run calibre-server as, as we will not run it as root!" |
481 |
+ eerror "Modify CALIBRE_USER to your needs (you can also add a group, after a colon)" |
482 |
+ return 1 |
483 |
+ fi |
484 |
+ if ! getent passwd "${CALIBRE_USER%:*}" >/dev/null ; then |
485 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
486 |
+ eerror "Your user has to exist!" |
487 |
+ return 1 |
488 |
+ fi |
489 |
+ if [ "${CALIBRE_USER%:*}" != "${CALIBRE_USER}" ] ; then |
490 |
+ if ! getent group "${CALIBRE_USER#*:}" >/dev/null ; then |
491 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
492 |
+ eerror "Your group has to exist too!" |
493 |
+ return 1 |
494 |
+ fi |
495 |
+ fi |
496 |
+ if [ "${CALIBRE_LIBRARY}" = "" ] ; then |
497 |
+ CALIBRE_USER_HOME=$(getent passwd "${CALIBRE_USER%:*}" | cut -d ':' -f 6) |
498 |
+ CALIBRE_LIBRARY="${CALIBRE_USER_HOME}/Calibre Library" |
499 |
+ fi |
500 |
+ if [ ! -d "${CALIBRE_LIBRARY}" ] ; then |
501 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
502 |
+ eerror "The Calibre library, '${CALIBRE_LIBRARY},' does not exist." |
503 |
+ eerror "Please modify CALIBRE_LIBRARY to point to a valid library." |
504 |
+ return 1 |
505 |
+ fi |
506 |
+ return 0 |
507 |
+} |
508 |
+ |
509 |
+start() { |
510 |
+ checkconfig || return $? |
511 |
+ local pidfile=/var/run/calibre-server.pid |
512 |
+ ebegin "Starting calibre-server" |
513 |
+ start-stop-daemon --user "${CALIBRE_USER}" \ |
514 |
+ --pidfile "${pidfile}" --make-pidfile --background --exec /usr/bin/calibre-server \ |
515 |
+ -- ${CALIBRE_OPTS} "${CALIBRE_LIBRARY}" |
516 |
+ eend $? |
517 |
+} |
518 |
+ |
519 |
+stop() { |
520 |
+ ebegin "Stopping calibre-server" |
521 |
+ start-stop-daemon --stop --user "${CALIBRE_USER}" \ |
522 |
+ --pidfile /var/run/calibre-server.pid |
523 |
+ eend $? |
524 |
+} |
525 |
|
526 |
diff --git a/app-text/calibre/files/calibre-server.conf b/app-text/calibre/files/calibre-server.conf |
527 |
new file mode 100644 |
528 |
index 0000000..c1bed84 |
529 |
--- /dev/null |
530 |
+++ b/app-text/calibre/files/calibre-server.conf |
531 |
@@ -0,0 +1,13 @@ |
532 |
+# /etc/conf.d/calibre-server |
533 |
+# Change this to the user you want to run calibre-server as. |
534 |
+# You may specify a group too, after a colon |
535 |
+# NOTE: This must be set and not to root! |
536 |
+CALIBRE_USER= |
537 |
+ |
538 |
+# Set the path of the library to serve. |
539 |
+# Defaults to the default location for CALIBRE_USER. |
540 |
+#CALIBRE_LIBRARY='<user home directory>/Calibre Library' |
541 |
+ |
542 |
+# Extra options to pass to calibre-server. |
543 |
+# See the calibre-server man page for more options. |
544 |
+#CALIBRE_OPTS="--username calibre --password password --thread-pool 10 --port 8080" |
545 |
|
546 |
diff --git a/app-text/calibre/files/calibre-server.init b/app-text/calibre/files/calibre-server.init |
547 |
new file mode 100644 |
548 |
index 0000000..2f90542 |
549 |
--- /dev/null |
550 |
+++ b/app-text/calibre/files/calibre-server.init |
551 |
@@ -0,0 +1,58 @@ |
552 |
+#!/sbin/openrc-run |
553 |
+# Copyright 1999-2012 Gentoo Foundation |
554 |
+# Distributed under the terms of the GNU General Public License, v2 or later |
555 |
+ |
556 |
+depend() { |
557 |
+ need net |
558 |
+ need localmount |
559 |
+ after bootmisc |
560 |
+} |
561 |
+ |
562 |
+checkconfig() { |
563 |
+ if [ "${CALIBRE_USER}" = "" -o "${CALIBRE_USER}" = "root" ] ; then |
564 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
565 |
+ eerror "You have to specify a user to run calibre-server as, as we will not run it as root!" |
566 |
+ eerror "Modify CALIBRE_USER to your needs (you can also add a group, after a colon)" |
567 |
+ return 1 |
568 |
+ fi |
569 |
+ if ! getent passwd "${CALIBRE_USER%:*}" >/dev/null ; then |
570 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
571 |
+ eerror "Your user has to exist!" |
572 |
+ return 1 |
573 |
+ fi |
574 |
+ if [ "${CALIBRE_USER%:*}" != "${CALIBRE_USER}" ] ; then |
575 |
+ if ! getent group "${CALIBRE_USER#*:}" >/dev/null ; then |
576 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
577 |
+ eerror "Your group has to exist too!" |
578 |
+ return 1 |
579 |
+ fi |
580 |
+ fi |
581 |
+ if [ "${CALIBRE_LIBRARY}" = "" ] ; then |
582 |
+ CALIBRE_USER_HOME=$(getent passwd "${CALIBRE_USER%:*}" | cut -d ':' -f 6) |
583 |
+ CALIBRE_LIBRARY="${CALIBRE_USER_HOME}/Calibre Library" |
584 |
+ fi |
585 |
+ if [ ! -d "${CALIBRE_LIBRARY}" ] ; then |
586 |
+ eerror "Please edit /etc/conf.d/calibre-server" |
587 |
+ eerror "The Calibre library, '${CALIBRE_LIBRARY},' does not exist." |
588 |
+ eerror "Please modify CALIBRE_LIBRARY to point to a valid library." |
589 |
+ return 1 |
590 |
+ fi |
591 |
+ return 0 |
592 |
+} |
593 |
+ |
594 |
+start() { |
595 |
+ checkconfig || return $? |
596 |
+ local pidfile=/var/run/calibre-server.pid |
597 |
+ ebegin "Starting calibre-server" |
598 |
+ start-stop-daemon --user "${CALIBRE_USER}" \ |
599 |
+ --pidfile "${pidfile}" --make-pidfile --background --exec /usr/bin/calibre-server \ |
600 |
+ -- --with-library "${CALIBRE_LIBRARY}" ${CALIBRE_OPTS} |
601 |
+ eend $? |
602 |
+} |
603 |
+ |
604 |
+stop() { |
605 |
+ ebegin "Stopping calibre-server" |
606 |
+ start-stop-daemon --stop --user "${CALIBRE_USER}" \ |
607 |
+ --pidfile /var/run/calibre-server.pid |
608 |
+ eend $? |
609 |
+} |
610 |
|
611 |
diff --git a/app-text/calibre/metadata.xml b/app-text/calibre/metadata.xml |
612 |
new file mode 100644 |
613 |
index 0000000..2196cbe |
614 |
--- /dev/null |
615 |
+++ b/app-text/calibre/metadata.xml |
616 |
@@ -0,0 +1,13 @@ |
617 |
+<?xml version="1.0" encoding="UTF-8"?> |
618 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
619 |
+<pkgmetadata> |
620 |
+ <maintainer type="person"> |
621 |
+ <email>axs@g.o</email> |
622 |
+ </maintainer> |
623 |
+ <maintainer type="person"> |
624 |
+ <email>zmedico@g.o</email> |
625 |
+ </maintainer> |
626 |
+ <upstream> |
627 |
+ <remote-id type="sourceforge">calibre</remote-id> |
628 |
+ </upstream> |
629 |
+</pkgmetadata> |