1 |
commit: 85663c4f667b65d8795ccb6e38f4e76df2963c23 |
2 |
Author: Per Pomsel <phantom4 <AT> gmx <DOT> net> |
3 |
AuthorDate: Mon Mar 11 17:32:49 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 11 17:55:26 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85663c4f |
7 |
|
8 |
app-text/calibre: version bump to 3.40.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/677032 |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
13 |
|
14 |
app-text/calibre/Manifest | 1 + |
15 |
app-text/calibre/calibre-3.40.1.ebuild | 290 +++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 291 insertions(+) |
17 |
|
18 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
19 |
index 1fc5102e2ac..ad48ed0fb9b 100644 |
20 |
--- a/app-text/calibre/Manifest |
21 |
+++ b/app-text/calibre/Manifest |
22 |
@@ -2,3 +2,4 @@ DIST calibre-3.26.1.tar.xz 39109660 BLAKE2B 0e98c273b8a5dfafea7a7027de3f83ad25ab |
23 |
DIST calibre-3.35.0.tar.xz 39482684 BLAKE2B acf61ad52b9de4ab87913d536890f1f74cd4bca656ec275cd5fe21d6bbb4b97792d7f13f40b85b61f7a27745be2aedfff8b6deb9f8dff980f6f30596c184f1f2 SHA512 c81a00832c812603e5c5752f47ad322fcd9aa5079273385af2e0d8813bf04c4b84cca40210d53207c5b52ac4975ecec725f5560cb3c629f4afe9150229138b0d |
24 |
DIST calibre-3.36.0.tar.xz 39685880 BLAKE2B 2de7a7ed24b34d15cd4e25f343f50bee412b7b64a5c30d9a0be339a899cbca46453b419fbfb60ff9f05d2853af939f3bb9cf65263193148ec6d33bf06964c72b SHA512 f7ddeb54dac7b52951dfdc4c14c4a18af436eed7e5d80326528d4101f8bf34a5de173049f04cda286f6172ff4aa8f0200a7e8d55aa720c36742327aebe5a9ab2 |
25 |
DIST calibre-3.38.1.tar.xz 38193788 BLAKE2B a42a8c3a628246def1f27488db729fc5a859bbadea344d04aec7d2ddc347bc97706d623ba522ad960bf239debe62eee126367417067e4a7c1d427af50584fd37 SHA512 4ce1453ff50894adafd027e9bad7cbd557b9b13d5939e53b8476083bb221f1c84cabc465c46f7b6361bcef60ed8da2d96dbfe9670ebf372e4864195e4748ee18 |
26 |
+DIST calibre-3.40.1.tar.xz 38365300 BLAKE2B 5b1b8624d81d8a60d954b3871e46ae5dad8a49a7efb6e986cfef133da6da249fa8b36d1eed3840322ddec9c8144772c1e9504e114d27774096a9939f2a58a326 SHA512 1333c24e384ccae79d264055e1e84b8a13919e68d9290a277e07bb7f3b4579d15090859b50945672c155a438a2bf9e5f088f094bc30781af7c5d0d9ccd7226f4 |
27 |
|
28 |
diff --git a/app-text/calibre/calibre-3.40.1.ebuild b/app-text/calibre/calibre-3.40.1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..a35d78bdf20 |
31 |
--- /dev/null |
32 |
+++ b/app-text/calibre/calibre-3.40.1.ebuild |
33 |
@@ -0,0 +1,290 @@ |
34 |
+# Copyright 1999-2019 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=6 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python2_7 ) |
40 |
+PYTHON_REQ_USE="sqlite,ssl" |
41 |
+ |
42 |
+inherit eutils bash-completion-r1 gnome2-utils multilib toolchain-funcs python-single-r1 xdg-utils |
43 |
+ |
44 |
+DESCRIPTION="Ebook management application" |
45 |
+HOMEPAGE="https://calibre-ebook.com/" |
46 |
+SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz" |
47 |
+ |
48 |
+LICENSE=" |
49 |
+ GPL-3+ |
50 |
+ GPL-3 |
51 |
+ GPL-2+ |
52 |
+ GPL-2 |
53 |
+ GPL-1+ |
54 |
+ LGPL-3+ |
55 |
+ LGPL-2.1+ |
56 |
+ LGPL-2.1 |
57 |
+ BSD |
58 |
+ MIT |
59 |
+ Old-MIT |
60 |
+ Apache-2.0 |
61 |
+ public-domain |
62 |
+ || ( Artistic GPL-1+ ) |
63 |
+ CC-BY-3.0 |
64 |
+ OFL-1.1 |
65 |
+ PSF-2 |
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.9.6_pre20171027:= |
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-libs/libinput:= |
80 |
+ >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}] |
81 |
+ >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}] |
82 |
+ >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}] |
83 |
+ >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
84 |
+ >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}] |
85 |
+ >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}] |
86 |
+ >=dev-libs/dbus-glib-0.106 |
87 |
+ >=sys-apps/dbus-1.10.8 |
88 |
+ >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}] |
89 |
+ >=dev-python/html5-parser-0.4.3[${PYTHON_USEDEP}] |
90 |
+ >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}] |
91 |
+ >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}] |
93 |
+ >=dev-python/msgpack-0.5.6[${PYTHON_USEDEP}] |
94 |
+ >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}] |
96 |
+ >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}] |
97 |
+ >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}] |
98 |
+ >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
99 |
+ >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}] |
100 |
+ dev-python/regex[${PYTHON_USEDEP}] |
101 |
+ dev-qt/qtcore:5= |
102 |
+ dev-qt/qtdbus:5= |
103 |
+ dev-qt/qtgui:5= |
104 |
+ dev-qt/qtwidgets:5= |
105 |
+ dev-util/desktop-file-utils |
106 |
+ dev-util/gtk-update-icon-cache |
107 |
+ media-fonts/liberation-fonts |
108 |
+ media-libs/fontconfig:= |
109 |
+ >=media-libs/freetype-2:= |
110 |
+ >=media-libs/libmtp-1.1.11:= |
111 |
+ >=media-libs/libwmf-0.2.8 |
112 |
+ >=media-gfx/optipng-0.7.6 |
113 |
+ >=sys-libs/zlib-1.2.11:= |
114 |
+ virtual/libusb:1= |
115 |
+ virtual/python-dnspython[${PYTHON_USEDEP}] |
116 |
+ x11-libs/libxkbcommon:= |
117 |
+ x11-libs/libX11:= |
118 |
+ x11-libs/libXext:= |
119 |
+ x11-libs/libXrender:= |
120 |
+ x11-misc/shared-mime-info |
121 |
+ >=x11-misc/xdg-utils-1.0.2-r2 |
122 |
+ ios? ( |
123 |
+ >=app-pda/usbmuxd-1.0.8 |
124 |
+ >=app-pda/libimobiledevice-1.2.0 |
125 |
+ ) |
126 |
+ udisks? ( virtual/libudev )" |
127 |
+RDEPEND="${COMMON_DEPEND} |
128 |
+ udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
129 |
+DEPEND="${COMMON_DEPEND} |
130 |
+ >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
131 |
+ >=virtual/podofo-build-0.9.6_pre20171027 |
132 |
+ virtual/pkgconfig" |
133 |
+ |
134 |
+pkg_pretend() { |
135 |
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then |
136 |
+ eerror "Calibre cannot be built with this version of gcc." |
137 |
+ eerror "You need at least gcc-6.0" |
138 |
+ die "Your C compiler is too old for this package." |
139 |
+ fi |
140 |
+} |
141 |
+ |
142 |
+src_prepare() { |
143 |
+ # no_updates: do not annoy user with "new version is availible all the time |
144 |
+ # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
145 |
+ eapply \ |
146 |
+ "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
147 |
+ "${FILESDIR}/${PN}-disable_plugins.patch" |
148 |
+ |
149 |
+ eapply_user |
150 |
+ |
151 |
+ # Fix outdated version constant. |
152 |
+ #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
153 |
+ # -i src/calibre/constants.py || \ |
154 |
+ # die "sed failed to patch constants.py" |
155 |
+ |
156 |
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
157 |
+ # calls xdg-* (bug #258938). |
158 |
+ sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
159 |
+ -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
160 |
+ -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
161 |
+ -e "s|, PreserveMIMEDefaults():|:|" \ |
162 |
+ -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
163 |
+ -e "s|cmd\[2\]|cmd[4]|" \ |
164 |
+ -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
165 |
+ -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
166 |
+ -i src/calibre/linux.py || die "sed failed to patch linux.py" |
167 |
+ |
168 |
+ # Disable unnecessary privilege dropping for bug #287067. |
169 |
+ sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
170 |
+ -i setup/install.py || die "sed failed to patch install.py" |
171 |
+ |
172 |
+ sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
173 |
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
174 |
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
175 |
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
176 |
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
177 |
+'-i', 'Makefile'])" \ |
178 |
+ -i setup/build.py || die "sed failed to patch build.py" |
179 |
+ |
180 |
+ # use system beautifulsoup, instead of bundled |
181 |
+ rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
182 |
+ || die "could not remove bundled beautifulsoup" |
183 |
+ find "${S}" -type f -name \*.py -exec \ |
184 |
+ sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
185 |
+ || die "could not sed bundled beautifulsoup out of the source tree" |
186 |
+ |
187 |
+ # avoid failure of xdg tools to recognize vendor prefix |
188 |
+ sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \ |
189 |
+ -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \ |
190 |
+ -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \ |
191 |
+ -i "${S}"/src/calibre/linux.py || die 'sed failed' |
192 |
+ |
193 |
+ # don't create/install uninstaller |
194 |
+ sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
198 |
+ # Bypass kbuildsycoca and update-mime-database in order to |
199 |
+ # avoid sandbox violations if xdg-mime tries to call them. |
200 |
+ cat - > "${T}/kbuildsycoca" <<-EOF |
201 |
+ #!${BASH} |
202 |
+ echo $0 : $@ |
203 |
+ exit 0 |
204 |
+ EOF |
205 |
+ |
206 |
+ cp "${T}"/{kbuildsycoca,update-mime-database} || die |
207 |
+ chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
208 |
+ |
209 |
+ export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
210 |
+ |
211 |
+ # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
212 |
+ # violation with kbuildsycoca as in bug #287067, comment #13. |
213 |
+ export -n DISPLAY |
214 |
+ |
215 |
+ # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
216 |
+ # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
217 |
+ # return _parse_localename(localename) |
218 |
+ # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
219 |
+ # raise ValueError, 'unknown locale: %s' % localename |
220 |
+ #ValueError: unknown locale: 46 |
221 |
+ export -n LANGUAGE |
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 |
+ #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py |
240 |
+ #dodir $(python_get_sitedir) |
241 |
+ PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
242 |
+ "${PYTHON}" setup.py install \ |
243 |
+ --root="${D}" \ |
244 |
+ --prefix="${EPREFIX}/usr" \ |
245 |
+ --libdir="${EPREFIX}/usr/${libdir}" \ |
246 |
+ --staging-root="${ED}usr" \ |
247 |
+ --staging-libdir="${ED}usr/${libdir}" || die |
248 |
+ |
249 |
+ # The menu entries end up here due to '--mode user' being added to |
250 |
+ # xdg-* options in src_prepare. |
251 |
+ dodir /usr/share/mime/packages |
252 |
+ chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local |
253 |
+ mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ || |
254 |
+ die "failed to register mime types" |
255 |
+ dodir /usr/share/icons |
256 |
+ mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ || |
257 |
+ die "failed to install icon files" |
258 |
+ |
259 |
+ domenu "${HOME}"/.local/share/applications/*.desktop || |
260 |
+ die "failed to install .desktop menu files" |
261 |
+ |
262 |
+ find "${ED}"usr/share -type d -empty -delete |
263 |
+ |
264 |
+ cd "${ED}"/usr/share/calibre/fonts/liberation || die |
265 |
+ local x |
266 |
+ for x in * ; do |
267 |
+ [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
268 |
+ ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
269 |
+ done |
270 |
+ |
271 |
+ einfo "Converting python shebangs" |
272 |
+ python_fix_shebang "${ED}" |
273 |
+ |
274 |
+ einfo "Compiling python modules" |
275 |
+ python_optimize "${ED}"usr/lib/calibre |
276 |
+ |
277 |
+ newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
278 |
+ newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
279 |
+ |
280 |
+ bashcomp_alias calibre \ |
281 |
+ lrfviewer \ |
282 |
+ calibre-debug \ |
283 |
+ ebook-meta \ |
284 |
+ calibre-server \ |
285 |
+ ebook-viewer \ |
286 |
+ ebook-polish \ |
287 |
+ fetch-ebook-metadata \ |
288 |
+ lrf2lrs \ |
289 |
+ ebook-convert \ |
290 |
+ ebook-edit \ |
291 |
+ calibre-smtp \ |
292 |
+ ebook-device |
293 |
+ |
294 |
+} |
295 |
+ |
296 |
+pkg_preinst() { |
297 |
+ gnome2_icon_savelist |
298 |
+ # Indentify stray directories from upstream's "Binary install" |
299 |
+ # method (see bug 622728). |
300 |
+ CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
301 |
+ CALIBRE_LIB_CONTENT=$(for x in "${ED%/}${CALIBRE_LIB_DIR}"/*; do |
302 |
+ printf -- "${x##*/} "; done) || die "Failed to list ${ED%/}${CALIBRE_LIB_DIR}" |
303 |
+} |
304 |
+ |
305 |
+pkg_postinst() { |
306 |
+ [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
307 |
+ local x |
308 |
+ for x in "${EROOT%/}${CALIBRE_LIB_DIR}"/*; do |
309 |
+ if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
310 |
+ elog "Purging '${x}'" |
311 |
+ rm -rf "${x}" |
312 |
+ fi |
313 |
+ done |
314 |
+ xdg_desktop_database_update |
315 |
+ xdg_mimeinfo_database_update |
316 |
+ gnome2_icon_cache_update |
317 |
+} |
318 |
+ |
319 |
+pkg_postrm() { |
320 |
+ xdg_desktop_database_update |
321 |
+ xdg_mimeinfo_database_update |
322 |
+ gnome2_icon_cache_update |
323 |
+} |