1 |
commit: 27a3b90c29f7eaa808483af72d48a2fae5804f20 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 29 03:54:53 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 29 05:53:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27a3b90c |
7 |
|
8 |
app-text/calibre: Bump to version 5.31.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-text/calibre/Manifest | 1 + |
14 |
app-text/calibre/calibre-5.31.0.ebuild | 262 +++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 263 insertions(+) |
16 |
|
17 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
18 |
index b964061e63a..5f0cdd215e1 100644 |
19 |
--- a/app-text/calibre/Manifest |
20 |
+++ b/app-text/calibre/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbc |
22 |
DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae |
23 |
DIST calibre-5.25.0.tar.xz 36849112 BLAKE2B f9cb423317ea1f5b22e7f3540708fd4fa6e7dff2d6d2c667755c74c4f46b72f52aac7672933c51efaf56a5ef57e573c8927649fe30570481c2057e5f757cdfde SHA512 7913fec188d8a8c40cf2768671836f6431d233ac53d1d683222a12f8a753a11cc4023fcfc1dd5ca8b27fd049fb579563b1cdd89624b824ce4eec7b438e25006e |
24 |
DIST calibre-5.30.0.tar.xz 37002224 BLAKE2B dc034c54a6ebee838652fe10b467bf8408f8dabd759108d617e2c9f64109e92afe0f2994c5df480ec4346c596361ccb63d0aaab2796edc4993ae0eef4222ba6d SHA512 c2d435ec9a8cfd5f76439f229cd9a7a7f4e829e44d9f2ff37003faf8a925df40cd77471d72d05a8d145bfc104bf92dbdd67ddacabc84e6e3cad055887530d8bd |
25 |
+DIST calibre-5.31.0.tar.xz 36937976 BLAKE2B 55995aa8fc75ebee5506145ab7995ebcfd04dfa080eae48229a167e404cc4f091c27f9d9401656c52b1620b6d407904a6e454b0b693c6e194a871bc6fda30d4b SHA512 4a2926f86d4bb4e9b66312c9f988bdf9cbcf12096c76578259f9473f69f7e8c16f763934fbd2664ba8e3bd24fbe6a878c1e2a9df43152ea0fe0ba3d447dfed42 |
26 |
|
27 |
diff --git a/app-text/calibre/calibre-5.31.0.ebuild b/app-text/calibre/calibre-5.31.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..b01b4920f27 |
30 |
--- /dev/null |
31 |
+++ b/app-text/calibre/calibre-5.31.0.ebuild |
32 |
@@ -0,0 +1,262 @@ |
33 |
+# Copyright 1999-2021 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{8..9} ) |
39 |
+PYTHON_REQ_USE="ipv6(+),sqlite,ssl" |
40 |
+ |
41 |
+inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils |
42 |
+ |
43 |
+DESCRIPTION="Ebook management application" |
44 |
+HOMEPAGE="https://calibre-ebook.com/" |
45 |
+SRC_URI="https://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 |
+" |
66 |
+KEYWORDS="~amd64 ~arm ~x86" |
67 |
+SLOT="0" |
68 |
+IUSE="ios +udisks" |
69 |
+ |
70 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
71 |
+ |
72 |
+COMMON_DEPEND="${PYTHON_DEPS} |
73 |
+ >=app-text/hunspell-1.7:= |
74 |
+ >=app-text/podofo-0.9.6_pre20171027:= |
75 |
+ >=app-text/poppler-0.26.5[qt5] |
76 |
+ dev-libs/glib:2= |
77 |
+ dev-libs/hyphen:= |
78 |
+ >=dev-libs/icu-57.1:= |
79 |
+ dev-libs/libinput:= |
80 |
+ >=dev-libs/dbus-glib-0.106 |
81 |
+ dev-libs/snowball-stemmer:= |
82 |
+ >=sys-apps/dbus-1.10.8 |
83 |
+ $(python_gen_cond_dep ' |
84 |
+ >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}] |
85 |
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}] |
86 |
+ >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}] |
87 |
+ >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}] |
88 |
+ >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}] |
89 |
+ >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}] |
90 |
+ dev-python/dnspython[${PYTHON_USEDEP}] |
91 |
+ >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}] |
93 |
+ >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}] |
94 |
+ dev-python/jeepney[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}] |
96 |
+ >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}] |
97 |
+ >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}] |
98 |
+ >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}] |
99 |
+ >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}] |
100 |
+ >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}] |
101 |
+ >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}] |
102 |
+ >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}] |
103 |
+ >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}] |
104 |
+ >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
105 |
+ >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}] |
106 |
+ >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}] |
107 |
+ >=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}] |
108 |
+ dev-python/regex[${PYTHON_USEDEP}] |
109 |
+ dev-python/zeroconf[${PYTHON_USEDEP}] |
110 |
+ ') |
111 |
+ dev-qt/qtcore:5= |
112 |
+ dev-qt/qtdbus:5= |
113 |
+ dev-qt/qtgui:5=[jpeg] |
114 |
+ >=dev-qt/qtwebengine-5.12 |
115 |
+ dev-qt/qtwidgets:5= |
116 |
+ dev-util/desktop-file-utils |
117 |
+ dev-util/gtk-update-icon-cache |
118 |
+ media-fonts/liberation-fonts |
119 |
+ media-libs/fontconfig:= |
120 |
+ >=media-libs/freetype-2:= |
121 |
+ >=media-libs/libmtp-1.1.11:= |
122 |
+ >=media-libs/libwmf-0.2.8 |
123 |
+ >=media-gfx/optipng-0.7.6 |
124 |
+ >=sys-libs/zlib-1.2.11:= |
125 |
+ virtual/libusb:1= |
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 )" |
139 |
+DEPEND="${COMMON_DEPEND} |
140 |
+ $(python_gen_cond_dep ' |
141 |
+ >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
142 |
+ >=dev-python/sip-5[${PYTHON_USEDEP}] |
143 |
+ ') |
144 |
+ >=virtual/podofo-build-0.9.6_pre20171027 |
145 |
+ virtual/pkgconfig" |
146 |
+ |
147 |
+pkg_pretend() { |
148 |
+ if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then |
149 |
+ eerror "Calibre cannot be built with this version of gcc." |
150 |
+ eerror "You need at least gcc-6.0" |
151 |
+ die "Your C compiler is too old for this package." |
152 |
+ fi |
153 |
+} |
154 |
+ |
155 |
+src_prepare() { |
156 |
+ # no_updates: do not annoy user with "new version is availible all the time |
157 |
+ # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
158 |
+ eapply \ |
159 |
+ "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
160 |
+ "${FILESDIR}/${PN}-disable_plugins.patch" |
161 |
+ |
162 |
+ eapply_user |
163 |
+ |
164 |
+ # Fix outdated version constant. |
165 |
+ #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
166 |
+ # -i src/calibre/constants.py || \ |
167 |
+ # die "sed failed to patch constants.py" |
168 |
+ |
169 |
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
170 |
+ # calls xdg-* (bug #258938). |
171 |
+ sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
172 |
+ -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
173 |
+ -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
174 |
+ -e "s|, PreserveMIMEDefaults():|:|" \ |
175 |
+ -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
176 |
+ -e "s|cmd\[2\]|cmd[4]|" \ |
177 |
+ -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
178 |
+ -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
179 |
+ -i src/calibre/linux.py || die "sed failed to patch linux.py" |
180 |
+ |
181 |
+ # Disable unnecessary privilege dropping for bug #287067. |
182 |
+ sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
183 |
+ -i setup/install.py || die "sed failed to patch install.py" |
184 |
+ sed -e "/^ os.chdir(os.path.join(src_dir, 'build'))$/a\ |
185 |
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
186 |
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
187 |
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
188 |
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
189 |
+'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \ |
190 |
+ -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \ |
191 |
+ -i setup/build.py || die "sed failed to patch build.py" |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ # calibre works with python 3, so remove the python 2 constraint |
196 |
+ export CALIBRE_PY3_PORT=1 |
197 |
+ |
198 |
+ # Bypass kbuildsycoca and update-mime-database in order to |
199 |
+ # avoid sandbox violations if xdg-mime tries to call them. |
200 |
+ mkdir "${T}/bin" || die |
201 |
+ cat - > "${T}/bin/kbuildsycoca" <<-EOF |
202 |
+ #!${BASH} |
203 |
+ echo $0 : $@ |
204 |
+ exit 0 |
205 |
+ EOF |
206 |
+ |
207 |
+ cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die |
208 |
+ chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die |
209 |
+ |
210 |
+ export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
211 |
+ |
212 |
+ # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
213 |
+ # violation with kbuildsycoca as in bug #287067, comment #13. |
214 |
+ export -n DISPLAY |
215 |
+ |
216 |
+ # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
217 |
+ # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
218 |
+ # return _parse_localename(localename) |
219 |
+ # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
220 |
+ # raise ValueError, 'unknown locale: %s' % localename |
221 |
+ #ValueError: unknown locale: 46 |
222 |
+ export -n LANG LANGUAGE ${!LC_*} |
223 |
+ export LC_ALL=C.utf8 #709682 |
224 |
+ |
225 |
+ # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
226 |
+ # variables to point to our fake temporary $HOME. |
227 |
+ export HOME="${T}/fake_homedir" |
228 |
+ export XDG_CONFIG_HOME="${HOME}/.config" |
229 |
+ export XDG_DATA_HOME="${HOME}/.local/share" |
230 |
+ export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
231 |
+ mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
232 |
+ |
233 |
+ tc-export CC CXX |
234 |
+ # Bug #334243 - respect LDFLAGS when building extensions |
235 |
+ export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
236 |
+ local libdir=$(get_libdir) |
237 |
+ [[ -n $libdir ]] || die "get_libdir returned an empty string" |
238 |
+ |
239 |
+ addpredict /dev/dri #665310 |
240 |
+ |
241 |
+ PATH=${T}/bin:${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 |
+ find "${ED}"/usr/share -type d -empty -delete |
250 |
+ |
251 |
+ cd "${ED}"/usr/share/calibre/fonts/liberation || die |
252 |
+ local x |
253 |
+ for x in * ; do |
254 |
+ [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue |
255 |
+ ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
256 |
+ done |
257 |
+ |
258 |
+ einfo "Converting python shebangs" |
259 |
+ python_fix_shebang --force "${ED}" |
260 |
+ |
261 |
+ einfo "Compiling python modules" |
262 |
+ python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)" |
263 |
+ |
264 |
+ newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
265 |
+ newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
266 |
+} |
267 |
+ |
268 |
+pkg_preinst() { |
269 |
+ # Indentify stray directories from upstream's "Binary install" |
270 |
+ # method (see bug 622728). |
271 |
+ CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
272 |
+ CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do |
273 |
+ printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}" |
274 |
+} |
275 |
+ |
276 |
+pkg_postinst() { |
277 |
+ [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
278 |
+ local x |
279 |
+ for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do |
280 |
+ if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
281 |
+ elog "Purging '${x}'" |
282 |
+ rm -rf "${x}" |
283 |
+ fi |
284 |
+ done |
285 |
+ xdg_desktop_database_update |
286 |
+ xdg_mimeinfo_database_update |
287 |
+ xdg_icon_cache_update |
288 |
+} |
289 |
+ |
290 |
+pkg_postrm() { |
291 |
+ xdg_desktop_database_update |
292 |
+ xdg_mimeinfo_database_update |
293 |
+ xdg_icon_cache_update |
294 |
+} |