Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, profiles/
Date: Thu, 26 Aug 2021 23:58:35
Message-Id: 1630022218.051e64737602df4a8e9d977af8f00319778be7e8.sam@gentoo
1 commit: 051e64737602df4a8e9d977af8f00319778be7e8
2 Author: Marco Genasci <fedeliallalinea <AT> gmail <DOT> com>
3 AuthorDate: Thu Aug 12 12:46:50 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 26 23:56:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051e6473
7
8 app-text/calibre: version bump to 5.25.0
9
10 Closes: https://bugs.gentoo.org/794679
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 RepoMan-Options: --ignore-arches
13 Signed-off-by: Marco Genasci <fedeliallalinea <AT> gmail.com>
14 Closes: https://github.com/gentoo/gentoo/pull/21959
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 app-text/calibre/Manifest | 1 +
18 app-text/calibre/calibre-5.25.0.ebuild | 263 +++++++++++++++++++++++++++++++++
19 profiles/package.mask | 4 +
20 3 files changed, 268 insertions(+)
21
22 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
23 index eae60e865b0..d6a70bbcecb 100644
24 --- a/app-text/calibre/Manifest
25 +++ b/app-text/calibre/Manifest
26 @@ -1,2 +1,3 @@
27 DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbcffbf16248081ccf0ab313420fe3898954da71e0796b3d6c44e93c636113221f95fa6affc6be97bf41f4086a909b2849f9 SHA512 eb19e6bb328f60eb4af2c38d54c3d2a09989d41d71d27de10ab5ae443af902c3c12fc70042d4735dd785573cb63bb7d7a10ae5f7ed72afc1e1a9c6aacaf64aec
28 DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae
29 +DIST calibre-5.25.0.tar.xz 36849112 BLAKE2B f9cb423317ea1f5b22e7f3540708fd4fa6e7dff2d6d2c667755c74c4f46b72f52aac7672933c51efaf56a5ef57e573c8927649fe30570481c2057e5f757cdfde SHA512 7913fec188d8a8c40cf2768671836f6431d233ac53d1d683222a12f8a753a11cc4023fcfc1dd5ca8b27fd049fb579563b1cdd89624b824ce4eec7b438e25006e
30
31 diff --git a/app-text/calibre/calibre-5.25.0.ebuild b/app-text/calibre/calibre-5.25.0.ebuild
32 new file mode 100644
33 index 00000000000..a10b4359bcb
34 --- /dev/null
35 +++ b/app-text/calibre/calibre-5.25.0.ebuild
36 @@ -0,0 +1,263 @@
37 +# Copyright 1999-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=8
41 +
42 +PYTHON_COMPAT=( python3_{8..9} )
43 +PYTHON_REQ_USE="ipv6,sqlite,ssl"
44 +
45 +inherit bash-completion-r1 desktop toolchain-funcs python-single-r1 xdg-utils
46 +
47 +DESCRIPTION="Ebook management application"
48 +HOMEPAGE="https://calibre-ebook.com/"
49 +SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
50 +
51 +LICENSE="
52 + GPL-3+
53 + GPL-3
54 + GPL-2+
55 + GPL-2
56 + GPL-1+
57 + LGPL-3+
58 + LGPL-2.1+
59 + LGPL-2.1
60 + BSD
61 + MIT
62 + Old-MIT
63 + Apache-2.0
64 + public-domain
65 + || ( Artistic GPL-1+ )
66 + CC-BY-3.0
67 + OFL-1.1
68 + PSF-2
69 +"
70 +KEYWORDS="~amd64 ~arm ~x86"
71 +SLOT="0"
72 +IUSE="ios +udisks"
73 +
74 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
75 +
76 +COMMON_DEPEND="${PYTHON_DEPS}
77 + >=app-text/hunspell-1.7:=
78 + >=app-text/podofo-0.9.6_pre20171027:=
79 + >=app-text/poppler-0.26.5[qt5]
80 + dev-libs/glib:2=
81 + dev-libs/hyphen:=
82 + >=dev-libs/icu-57.1:=
83 + dev-libs/libinput:=
84 + >=dev-libs/dbus-glib-0.106
85 + dev-libs/snowball-stemmer
86 + >=sys-apps/dbus-1.10.8
87 + $(python_gen_cond_dep '
88 + >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
89 + dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
90 + >=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
91 + >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
92 + >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
93 + >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
94 + dev-python/dnspython[${PYTHON_USEDEP}]
95 + >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
96 + >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
97 + >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
98 + dev-python/jeepney[${PYTHON_USEDEP}]
99 + >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
100 + >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
101 + >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
102 + >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
103 + >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
104 + >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
105 + >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
106 + >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
107 + >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
108 + >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
109 + >=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
110 + >=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
111 + >=dev-python/PyQtWebEngine-5.12[${PYTHON_USEDEP}]
112 + dev-python/regex[${PYTHON_USEDEP}]
113 + dev-python/zeroconf[${PYTHON_USEDEP}]
114 + ')
115 + dev-qt/qtcore:5=
116 + dev-qt/qtdbus:5=
117 + dev-qt/qtgui:5=[jpeg]
118 + >=dev-qt/qtwebengine-5.12
119 + dev-qt/qtwidgets:5=
120 + dev-util/desktop-file-utils
121 + dev-util/gtk-update-icon-cache
122 + media-fonts/liberation-fonts
123 + media-libs/fontconfig:=
124 + >=media-libs/freetype-2:=
125 + >=media-libs/libmtp-1.1.11:=
126 + >=media-libs/libwmf-0.2.8
127 + >=media-gfx/optipng-0.7.6
128 + >=sys-libs/zlib-1.2.11:=
129 + virtual/libusb:1=
130 + x11-libs/libxkbcommon:=
131 + x11-libs/libX11:=
132 + x11-libs/libXext:=
133 + x11-libs/libXrender:=
134 + x11-misc/shared-mime-info
135 + >=x11-misc/xdg-utils-1.0.2-r2
136 + ios? (
137 + >=app-pda/usbmuxd-1.0.8
138 + >=app-pda/libimobiledevice-1.2.0
139 + )
140 + udisks? ( virtual/libudev )"
141 +RDEPEND="${COMMON_DEPEND}
142 + udisks? ( sys-fs/udisks:2 )"
143 +DEPEND="${COMMON_DEPEND}
144 + $(python_gen_cond_dep '
145 + >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
146 + >=dev-python/sip-5[${PYTHON_USEDEP}]
147 + ')
148 + >=virtual/podofo-build-0.9.6_pre20171027
149 + virtual/pkgconfig"
150 +
151 +pkg_pretend() {
152 + if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
153 + eerror "Calibre cannot be built with this version of gcc."
154 + eerror "You need at least gcc-6.0"
155 + die "Your C compiler is too old for this package."
156 + fi
157 +}
158 +
159 +src_prepare() {
160 + # no_updates: do not annoy user with "new version is availible all the time
161 + # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
162 + eapply \
163 + "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
164 + "${FILESDIR}/${PN}-disable_plugins.patch"
165 +
166 + eapply_user
167 +
168 + # Fix outdated version constant.
169 + #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
170 + # -i src/calibre/constants.py || \
171 + # die "sed failed to patch constants.py"
172 +
173 + # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
174 + # calls xdg-* (bug #258938).
175 + sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
176 + -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
177 + -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
178 + -e "s|, PreserveMIMEDefaults():|:|" \
179 + -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
180 + -e "s|cmd\[2\]|cmd[4]|" \
181 + -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
182 + -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
183 + -i src/calibre/linux.py || die "sed failed to patch linux.py"
184 +
185 + # Disable unnecessary privilege dropping for bug #287067.
186 + sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
187 + -i setup/install.py || die "sed failed to patch install.py"
188 +
189 + sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
190 +\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
191 +'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
192 +'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
193 +'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
194 +'-i', 'Makefile'])" \
195 + -e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
196 + -i setup/build.py || die "sed failed to patch build.py"
197 +}
198 +
199 +src_install() {
200 + # calibre works with python 3, so remove the python 2 constraint
201 + export CALIBRE_PY3_PORT=1
202 +
203 + # Bypass kbuildsycoca and update-mime-database in order to
204 + # avoid sandbox violations if xdg-mime tries to call them.
205 + mkdir "${T}/bin" || die
206 + cat - > "${T}/bin/kbuildsycoca" <<-EOF
207 + #!${BASH}
208 + echo $0 : $@
209 + exit 0
210 + EOF
211 +
212 + cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
213 + chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
214 +
215 + export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
216 +
217 + # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
218 + # violation with kbuildsycoca as in bug #287067, comment #13.
219 + export -n DISPLAY
220 +
221 + # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
222 + # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
223 + # return _parse_localename(localename)
224 + # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
225 + # raise ValueError, 'unknown locale: %s' % localename
226 + #ValueError: unknown locale: 46
227 + export -n LANG LANGUAGE ${!LC_*}
228 + export LC_ALL=C.utf8 #709682
229 +
230 + # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
231 + # variables to point to our fake temporary $HOME.
232 + export HOME="${T}/fake_homedir"
233 + export XDG_CONFIG_HOME="${HOME}/.config"
234 + export XDG_DATA_HOME="${HOME}/.local/share"
235 + export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
236 + mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
237 +
238 + tc-export CC CXX
239 + # Bug #334243 - respect LDFLAGS when building extensions
240 + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
241 + local libdir=$(get_libdir)
242 + [[ -n $libdir ]] || die "get_libdir returned an empty string"
243 +
244 + addpredict /dev/dri #665310
245 +
246 + PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
247 + "${PYTHON}" setup.py install \
248 + --root="${D}" \
249 + --prefix="${EPREFIX}/usr" \
250 + --libdir="${EPREFIX}/usr/${libdir}" \
251 + --staging-root="${ED}/usr" \
252 + --staging-libdir="${ED}/usr/${libdir}" || die
253 +
254 + find "${ED}"/usr/share -type d -empty -delete
255 +
256 + cd "${ED}"/usr/share/calibre/fonts/liberation || die
257 + local x
258 + for x in * ; do
259 + [[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
260 + ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
261 + done
262 +
263 + einfo "Converting python shebangs"
264 + python_fix_shebang --force "${ED}"
265 +
266 + einfo "Compiling python modules"
267 + python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
268 +
269 + newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
270 + newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
271 +}
272 +
273 +pkg_preinst() {
274 + # Indentify stray directories from upstream's "Binary install"
275 + # method (see bug 622728).
276 + CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
277 + CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
278 + printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
279 +}
280 +
281 +pkg_postinst() {
282 + [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
283 + local x
284 + for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
285 + if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
286 + elog "Purging '${x}'"
287 + rm -rf "${x}"
288 + fi
289 + done
290 + xdg_desktop_database_update
291 + xdg_mimeinfo_database_update
292 + xdg_icon_cache_update
293 +}
294 +
295 +pkg_postrm() {
296 + xdg_desktop_database_update
297 + xdg_mimeinfo_database_update
298 + xdg_icon_cache_update
299 +}
300
301 diff --git a/profiles/package.mask b/profiles/package.mask
302 index 44d7d5d7800..94079625723 100644
303 --- a/profiles/package.mask
304 +++ b/profiles/package.mask
305 @@ -340,6 +340,10 @@ sys-libs/db:5.1
306 >=dev-python/PyQtWebEngine-5.15.5_pre
307 >=dev-python/qscintilla-python-2.13
308
309 +# Marco Genasci <fedeliallalinea@×××××.com>
310 +# Masked because depends on dev-python/PyQt5-5.15.5_pre
311 +>=app-text/calibre-5.25.0
312 +
313 # Sam James <sam@g.o> (2021-06-12)
314 # Masked until all reverse dependencies support
315 # OCaml 4.12.