1 |
commit: b4864b542aa7641557ae3cb7af850d0d604d9bf3 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 7 18:50:19 2020 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 7 18:52:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4864b54 |
7 |
|
8 |
app-text/calibre: Bump to version 4.12.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.92, Repoman-2.3.20 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-text/calibre/Manifest | 1 + |
14 |
app-text/calibre/calibre-4.12.0.ebuild | 274 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 275 insertions(+) |
16 |
|
17 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
18 |
index 6410c6a8ab2..deea0ca9660 100644 |
19 |
--- a/app-text/calibre/Manifest |
20 |
+++ b/app-text/calibre/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST calibre-4.10.1.tar.xz 37012272 BLAKE2B e5d9421ed986da8ec7d814f364702fe04bcbb76b5e08dedfadd7164c81943cdfe6f012042e82a4715e3ccda284efdf44340af0bde9d03cbc7c22cbcf10136a55 SHA512 eb6f4fd458da3e3e1121ff72da0dfb2bdc38cec98bdaf538e6761563aa176aae2439e4949424795c239a8fa8ebde507564452495ef71f3f7f19b25435e10a41a |
23 |
DIST calibre-4.11.1.tar.xz 37042376 BLAKE2B a21a6d01afce4f0a02c1fe6cfba9a77cabd88da72ddb761368ad606d6eb08e3126bd53099a075c26503e91187699d4fef5e8ab3290b7c1e9c94c8310db23af6f SHA512 b6ad65da63f1ec5665116cfc82b8bc1c462d94842d1f53034417db6aa5fbb2e4f90801cba1daa76c54a2c6689e14ae12857cf234afe90356931b8458aeb5ab5a |
24 |
DIST calibre-4.11.2.tar.xz 37045372 BLAKE2B 7d76d45afd9228d6346daefaf4ee7cbf4d3281379c96d0ae63b3073b6b5ed055bd2eca0ae728f1471460e3aa8cf9b3afa3e489c4c2f02c6849b39b94e2c2023a SHA512 64f1779ea16e2aedbc91e815b015ffbcfcc2d50035dddc9b33588007ceeeaa5cf4cca84b40fbc9c5808e9b6dab3b04047f37505815120a1e66650447363672f2 |
25 |
+DIST calibre-4.12.0.tar.xz 36823140 BLAKE2B b8dd24152b79790c8d22d3c0aa9482f69250fe177499e01c6c0564bf31946d0266a2e3053549f037c7ea7626b18a27798097bfbe0caf93f97585d4869c475ab9 SHA512 628308273b507ee2557cd089e5c7b77f8304c1728b9aadfe5493b22042bdcf2da4c07652a6432121b5dd432807bcda21fabb81c37e59f87d24ace52539f3244c |
26 |
DIST calibre-4.9.1.tar.xz 37529656 BLAKE2B 5d703ca0c398b43cc26a54e0628d0fe938c6a5027a4fd0c9cac83944e5143eb08439bf79b2098182be7727eaa042748f17866788b02c7744178dce131f6b1d1e SHA512 bf06aa3cbc8d255934f3f7f3ce20b4798edf107ed9f822943d2b4ae7d95473842928ed79f8ba7571f7e0ebdc267c441916d543d5b7630aae5cb151bcc3184b71 |
27 |
|
28 |
diff --git a/app-text/calibre/calibre-4.12.0.ebuild b/app-text/calibre/calibre-4.12.0.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..25d08cce198 |
31 |
--- /dev/null |
32 |
+++ b/app-text/calibre/calibre-4.12.0.ebuild |
33 |
@@ -0,0 +1,274 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{6,7} ) |
40 |
+PYTHON_REQ_USE="sqlite,ssl" |
41 |
+ |
42 |
+inherit bash-completion-r1 desktop 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 ~x86" |
68 |
+SLOT="0" |
69 |
+IUSE="ios +udisks" |
70 |
+ |
71 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
72 |
+ |
73 |
+COMMON_DEPEND="${PYTHON_DEPS} |
74 |
+ >=app-text/hunspell-1.7:= |
75 |
+ >=app-text/podofo-0.9.6_pre20171027:= |
76 |
+ >=app-text/poppler-0.26.5[qt5] |
77 |
+ >=dev-libs/chmlib-0.40:= |
78 |
+ dev-libs/glib:2= |
79 |
+ dev-libs/hyphen:= |
80 |
+ >=dev-libs/icu-57.1:= |
81 |
+ dev-libs/libinput:= |
82 |
+ >=dev-libs/dbus-glib-0.106 |
83 |
+ >=sys-apps/dbus-1.10.8 |
84 |
+ $(python_gen_cond_dep ' |
85 |
+ >=dev-python/apsw-3.25.2_p1[${PYTHON_MULTI_USEDEP}] |
86 |
+ dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}] |
87 |
+ >=dev-python/chardet-3.0.3[${PYTHON_MULTI_USEDEP}] |
88 |
+ >=dev-python/cssselect-0.7.1[${PYTHON_MULTI_USEDEP}] |
89 |
+ >=dev-python/css-parser-1.0.4[${PYTHON_MULTI_USEDEP}] |
90 |
+ >=dev-python/dbus-python-1.2.4[${PYTHON_MULTI_USEDEP}] |
91 |
+ dev-python/dnspython[${PYTHON_MULTI_USEDEP}] |
92 |
+ >=dev-python/feedparser-5.2.1[${PYTHON_MULTI_USEDEP}] |
93 |
+ >=dev-python/html2text-2019.8.11[${PYTHON_MULTI_USEDEP}] |
94 |
+ >=dev-python/html5-parser-0.4.9[${PYTHON_MULTI_USEDEP}] |
95 |
+ >=dev-python/lxml-3.8.0[${PYTHON_MULTI_USEDEP}] |
96 |
+ >=dev-python/markdown-3.0.1[${PYTHON_MULTI_USEDEP}] |
97 |
+ >=dev-python/mechanize-0.3.5[${PYTHON_MULTI_USEDEP}] |
98 |
+ >=dev-python/msgpack-0.5.6[${PYTHON_MULTI_USEDEP}] |
99 |
+ >=dev-python/netifaces-0.10.5[${PYTHON_MULTI_USEDEP}] |
100 |
+ >=dev-python/pillow-3.2.0[${PYTHON_MULTI_USEDEP}] |
101 |
+ >=dev-python/psutil-4.3.0[${PYTHON_MULTI_USEDEP}] |
102 |
+ >=dev-python/pygments-2.3.1[${PYTHON_MULTI_USEDEP}] |
103 |
+ >=dev-python/python-dateutil-2.5.3[${PYTHON_MULTI_USEDEP}] |
104 |
+ >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_MULTI_USEDEP}] |
105 |
+ >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}] |
106 |
+ dev-python/regex[${PYTHON_MULTI_USEDEP}] |
107 |
+ dev-python/zeroconf[${PYTHON_MULTI_USEDEP}] |
108 |
+ ') |
109 |
+ dev-qt/qtcore:5= |
110 |
+ dev-qt/qtdbus:5= |
111 |
+ dev-qt/qtgui:5= |
112 |
+ >=dev-qt/qtwebengine-5.12 |
113 |
+ dev-qt/qtwidgets:5= |
114 |
+ dev-util/desktop-file-utils |
115 |
+ dev-util/gtk-update-icon-cache |
116 |
+ media-fonts/liberation-fonts |
117 |
+ media-libs/fontconfig:= |
118 |
+ >=media-libs/freetype-2:= |
119 |
+ >=media-libs/libmtp-1.1.11:= |
120 |
+ >=media-libs/libwmf-0.2.8 |
121 |
+ >=media-gfx/optipng-0.7.6 |
122 |
+ >=sys-libs/zlib-1.2.11:= |
123 |
+ virtual/libusb:1= |
124 |
+ x11-libs/libxkbcommon:= |
125 |
+ x11-libs/libX11:= |
126 |
+ x11-libs/libXext:= |
127 |
+ x11-libs/libXrender:= |
128 |
+ x11-misc/shared-mime-info |
129 |
+ >=x11-misc/xdg-utils-1.0.2-r2 |
130 |
+ ios? ( |
131 |
+ >=app-pda/usbmuxd-1.0.8 |
132 |
+ >=app-pda/libimobiledevice-1.2.0 |
133 |
+ ) |
134 |
+ udisks? ( virtual/libudev )" |
135 |
+RDEPEND="${COMMON_DEPEND} |
136 |
+ udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
137 |
+DEPEND="${COMMON_DEPEND} |
138 |
+ $(python_gen_cond_dep ' |
139 |
+ >=dev-python/setuptools-23.1.0[${PYTHON_MULTI_USEDEP}] |
140 |
+ dev-python/sip[${PYTHON_MULTI_USEDEP}] |
141 |
+ ') |
142 |
+ >=virtual/podofo-build-0.9.6_pre20171027 |
143 |
+ virtual/pkgconfig" |
144 |
+ |
145 |
+pkg_pretend() { |
146 |
+ if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then |
147 |
+ eerror "Calibre cannot be built with this version of gcc." |
148 |
+ eerror "You need at least gcc-6.0" |
149 |
+ die "Your C compiler is too old for this package." |
150 |
+ fi |
151 |
+} |
152 |
+ |
153 |
+src_prepare() { |
154 |
+ # no_updates: do not annoy user with "new version is availible all the time |
155 |
+ # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
156 |
+ eapply \ |
157 |
+ "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
158 |
+ "${FILESDIR}/${PN}-disable_plugins.patch" |
159 |
+ |
160 |
+ eapply_user |
161 |
+ |
162 |
+ # Fix outdated version constant. |
163 |
+ #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
164 |
+ # -i src/calibre/constants.py || \ |
165 |
+ # die "sed failed to patch constants.py" |
166 |
+ |
167 |
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
168 |
+ # calls xdg-* (bug #258938). |
169 |
+ sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
170 |
+ -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
171 |
+ -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
172 |
+ -e "s|, PreserveMIMEDefaults():|:|" \ |
173 |
+ -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
174 |
+ -e "s|cmd\[2\]|cmd[4]|" \ |
175 |
+ -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
176 |
+ -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
177 |
+ -i src/calibre/linux.py || die "sed failed to patch linux.py" |
178 |
+ |
179 |
+ # Disable unnecessary privilege dropping for bug #287067. |
180 |
+ sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
181 |
+ -i setup/install.py || die "sed failed to patch install.py" |
182 |
+ |
183 |
+ sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
184 |
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
185 |
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
186 |
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
187 |
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
188 |
+'-i', 'Makefile'])" \ |
189 |
+ -i setup/build.py || die "sed failed to patch build.py" |
190 |
+} |
191 |
+ |
192 |
+src_install() { |
193 |
+ # calibre works with python 3, so remove the python 2 constraint |
194 |
+ export CALIBRE_PY3_PORT=1 |
195 |
+ |
196 |
+ # Bypass kbuildsycoca and update-mime-database in order to |
197 |
+ # avoid sandbox violations if xdg-mime tries to call them. |
198 |
+ cat - > "${T}/kbuildsycoca" <<-EOF |
199 |
+ #!${BASH} |
200 |
+ echo $0 : $@ |
201 |
+ exit 0 |
202 |
+ EOF |
203 |
+ |
204 |
+ cp "${T}"/{kbuildsycoca,update-mime-database} || die |
205 |
+ chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
206 |
+ |
207 |
+ export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
208 |
+ |
209 |
+ # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
210 |
+ # violation with kbuildsycoca as in bug #287067, comment #13. |
211 |
+ export -n DISPLAY |
212 |
+ |
213 |
+ # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
214 |
+ # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
215 |
+ # return _parse_localename(localename) |
216 |
+ # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
217 |
+ # raise ValueError, 'unknown locale: %s' % localename |
218 |
+ #ValueError: unknown locale: 46 |
219 |
+ export -n LANG LANGUAGE ${!LC_*} |
220 |
+ export LC_ALL=C.utf8 #709682 |
221 |
+ |
222 |
+ # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
223 |
+ # variables to point to our fake temporary $HOME. |
224 |
+ export HOME="${T}/fake_homedir" |
225 |
+ export XDG_CONFIG_HOME="${HOME}/.config" |
226 |
+ export XDG_DATA_HOME="${HOME}/.local/share" |
227 |
+ export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
228 |
+ mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
229 |
+ |
230 |
+ tc-export CC CXX |
231 |
+ # Bug #334243 - respect LDFLAGS when building extensions |
232 |
+ export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
233 |
+ local libdir=$(get_libdir) |
234 |
+ [[ -n $libdir ]] || die "get_libdir returned an empty string" |
235 |
+ |
236 |
+ addpredict /dev/dri #665310 |
237 |
+ |
238 |
+ PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
239 |
+ "${PYTHON}" setup.py install \ |
240 |
+ --root="${D}" \ |
241 |
+ --prefix="${EPREFIX}/usr" \ |
242 |
+ --libdir="${EPREFIX}/usr/${libdir}" \ |
243 |
+ --staging-root="${ED}/usr" \ |
244 |
+ --staging-libdir="${ED}/usr/${libdir}" || die |
245 |
+ |
246 |
+ rm "${ED}/usr/share/applications/defaults.list" || die |
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 --force "${ED}" |
258 |
+ |
259 |
+ einfo "Compiling python modules" |
260 |
+ python_optimize "${ED}"/usr/lib/calibre |
261 |
+ |
262 |
+ newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
263 |
+ newconfd "${FILESDIR}"/calibre-server-3.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_preinst() { |
282 |
+ # Indentify stray directories from upstream's "Binary install" |
283 |
+ # method (see bug 622728). |
284 |
+ CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
285 |
+ CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do |
286 |
+ printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}" |
287 |
+} |
288 |
+ |
289 |
+pkg_postinst() { |
290 |
+ [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
291 |
+ local x |
292 |
+ for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do |
293 |
+ if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
294 |
+ elog "Purging '${x}'" |
295 |
+ rm -rf "${x}" |
296 |
+ fi |
297 |
+ done |
298 |
+ xdg_desktop_database_update |
299 |
+ xdg_mimeinfo_database_update |
300 |
+ xdg_icon_cache_update |
301 |
+} |
302 |
+ |
303 |
+pkg_postrm() { |
304 |
+ xdg_desktop_database_update |
305 |
+ xdg_mimeinfo_database_update |
306 |
+ xdg_icon_cache_update |
307 |
+} |