1 |
commit: 50ffdc20817f73a7fe5c4ec9998b298e07df06ec |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 18 04:31:51 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 18 04:32:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50ffdc20 |
7 |
|
8 |
app-text/calibre: Bump to version 4.2.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.77, Repoman-2.3.17 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-text/calibre/Manifest | 1 + |
14 |
app-text/calibre/calibre-4.2.0.ebuild | 271 ++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 272 insertions(+) |
16 |
|
17 |
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest |
18 |
index cdc02b5864f..718285fb3a1 100644 |
19 |
--- a/app-text/calibre/Manifest |
20 |
+++ b/app-text/calibre/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST calibre-3.47.1.tar.xz 38710008 BLAKE2B 60915345dd756d085386af61128e92569304be64aadbc21b69973e93adf3fb5cc88f7250153c238ecf423546f408bfc094b5bce329a54e7f080f831c4a8c23c1 SHA512 010796b3ac3fc6adcdf26dbc7966946be0f48b2684e1317da11d77fa55151d1f6ad2b86adf3c8eced5559823567e6672bfdfd953c17e6cc978894544131fb6bd |
23 |
DIST calibre-3.48.0.tar.xz 38777408 BLAKE2B 9a7fae20487ae93120cfdc06a312a42d54d68935fdd2bc18dc41be5f8d359c79eae24e0409ba8e7f4df85e2f073f80ce6bab56cba0638cead6693600fa93cb41 SHA512 6cee28fb560e2e00b8ac2f32756f094146c6fe744cfc343d68f1fb54b3f8b0ca16129a5b35018af54a103790faa2eb03ac186c01003f21c874d2ed5218441220 |
24 |
DIST calibre-4.1.0.tar.xz 36231016 BLAKE2B 85987b8b8b37deb40f9ebb7d918e15e9a763cca00cf26eab841d0035309bd066f675d50d1ca94cb65e512d1964bac4241b3006aa38cac14ec0cb5e2d6416d2a8 SHA512 9a4766ccec830e553b5165f9a3b1111a6b4d0dbadee8b6a6547fef1dc3ca51adc886d9c3d751af23f4ff3a30a0fe03606c70ab57245ea38bfb486c111fd0e82e |
25 |
+DIST calibre-4.2.0.tar.xz 36319240 BLAKE2B a37baae9c77ae2535782c5ee2095a33874c394b7f6415f4aac2752330c6cac3972723e75b90d38955a67a5df90de4318b740ca357b7149f610245f1895482437 SHA512 653dec2ba7a7ca122425619dc148765aea5cd60ede7fab23c1b10b0a7ba70f055bc6167732d4e21f161f37b313a7f2f9dde81240e1226a11a24b1195c9e38866 |
26 |
|
27 |
diff --git a/app-text/calibre/calibre-4.2.0.ebuild b/app-text/calibre/calibre-4.2.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..a435558ef33 |
30 |
--- /dev/null |
31 |
+++ b/app-text/calibre/calibre-4.2.0.ebuild |
32 |
@@ -0,0 +1,271 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+PYTHON_REQ_USE="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/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/dnspython[${PYTHON_USEDEP}] |
89 |
+ >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}] |
90 |
+ >=dev-python/html5-parser-0.4.3[${PYTHON_USEDEP}] |
91 |
+ >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}] |
93 |
+ >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}] |
94 |
+ >=dev-python/msgpack-0.5.6[${PYTHON_USEDEP}] |
95 |
+ >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}] |
96 |
+ >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}] |
97 |
+ >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}] |
98 |
+ >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}] |
99 |
+ >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}] |
100 |
+ >=dev-python/PyQt5-5.12[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}] |
101 |
+ >=dev-python/PyQtWebEngine-5.12[${PYTHON_USEDEP}] |
102 |
+ dev-python/regex[${PYTHON_USEDEP}] |
103 |
+ dev-qt/qtcore:5= |
104 |
+ dev-qt/qtdbus:5= |
105 |
+ dev-qt/qtgui:5= |
106 |
+ >=dev-qt/qtwebengine-5.12 |
107 |
+ dev-qt/qtwidgets:5= |
108 |
+ dev-util/desktop-file-utils |
109 |
+ dev-util/gtk-update-icon-cache |
110 |
+ media-fonts/liberation-fonts |
111 |
+ media-libs/fontconfig:= |
112 |
+ >=media-libs/freetype-2:= |
113 |
+ >=media-libs/libmtp-1.1.11:= |
114 |
+ >=media-libs/libwmf-0.2.8 |
115 |
+ >=media-gfx/optipng-0.7.6 |
116 |
+ >=sys-libs/zlib-1.2.11:= |
117 |
+ virtual/libusb:1= |
118 |
+ x11-libs/libxkbcommon:= |
119 |
+ x11-libs/libX11:= |
120 |
+ x11-libs/libXext:= |
121 |
+ x11-libs/libXrender:= |
122 |
+ x11-misc/shared-mime-info |
123 |
+ >=x11-misc/xdg-utils-1.0.2-r2 |
124 |
+ ios? ( |
125 |
+ >=app-pda/usbmuxd-1.0.8 |
126 |
+ >=app-pda/libimobiledevice-1.2.0 |
127 |
+ ) |
128 |
+ udisks? ( virtual/libudev )" |
129 |
+RDEPEND="${COMMON_DEPEND} |
130 |
+ udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )" |
131 |
+DEPEND="${COMMON_DEPEND} |
132 |
+ >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}] |
133 |
+ dev-python/sip[${PYTHON_USEDEP}] |
134 |
+ >=virtual/podofo-build-0.9.6_pre20171027 |
135 |
+ virtual/pkgconfig" |
136 |
+ |
137 |
+pkg_pretend() { |
138 |
+ if [[ ${MERGE_TYPE} != binary && $(gcc-major-version) -lt 6 ]]; then |
139 |
+ eerror "Calibre cannot be built with this version of gcc." |
140 |
+ eerror "You need at least gcc-6.0" |
141 |
+ die "Your C compiler is too old for this package." |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+src_prepare() { |
146 |
+ # no_updates: do not annoy user with "new version is availible all the time |
147 |
+ # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface |
148 |
+ eapply \ |
149 |
+ "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \ |
150 |
+ "${FILESDIR}/${PN}-disable_plugins.patch" |
151 |
+ |
152 |
+ eapply_user |
153 |
+ |
154 |
+ # Fix outdated version constant. |
155 |
+ #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \ |
156 |
+ # -i src/calibre/constants.py || \ |
157 |
+ # die "sed failed to patch constants.py" |
158 |
+ |
159 |
+ # Avoid sandbox violation in /usr/share/gnome/apps when linux.py |
160 |
+ # calls xdg-* (bug #258938). |
161 |
+ sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \ |
162 |
+ -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
163 |
+ -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \ |
164 |
+ -e "s|, PreserveMIMEDefaults():|:|" \ |
165 |
+ -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \ |
166 |
+ -e "s|cmd\[2\]|cmd[4]|" \ |
167 |
+ -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \ |
168 |
+ -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \ |
169 |
+ -i src/calibre/linux.py || die "sed failed to patch linux.py" |
170 |
+ |
171 |
+ # Disable unnecessary privilege dropping for bug #287067. |
172 |
+ sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \ |
173 |
+ -i setup/install.py || die "sed failed to patch install.py" |
174 |
+ |
175 |
+ sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\ |
176 |
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \ |
177 |
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \ |
178 |
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \ |
179 |
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \ |
180 |
+'-i', 'Makefile'])" \ |
181 |
+ -i setup/build.py || die "sed failed to patch build.py" |
182 |
+ |
183 |
+ # use system beautifulsoup, instead of bundled |
184 |
+ rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \ |
185 |
+ || die "could not remove bundled beautifulsoup" |
186 |
+ find "${S}" -type f -name \*.py -exec \ |
187 |
+ sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \ |
188 |
+ || die "could not sed bundled beautifulsoup out of the source tree" |
189 |
+} |
190 |
+ |
191 |
+src_install() { |
192 |
+ # Bypass kbuildsycoca and update-mime-database in order to |
193 |
+ # avoid sandbox violations if xdg-mime tries to call them. |
194 |
+ cat - > "${T}/kbuildsycoca" <<-EOF |
195 |
+ #!${BASH} |
196 |
+ echo $0 : $@ |
197 |
+ exit 0 |
198 |
+ EOF |
199 |
+ |
200 |
+ cp "${T}"/{kbuildsycoca,update-mime-database} || die |
201 |
+ chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die |
202 |
+ |
203 |
+ export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake" |
204 |
+ |
205 |
+ # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox |
206 |
+ # violation with kbuildsycoca as in bug #287067, comment #13. |
207 |
+ export -n DISPLAY |
208 |
+ |
209 |
+ # Bug #352625 - Some LANGUAGE values can trigger the following ValueError: |
210 |
+ # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale |
211 |
+ # return _parse_localename(localename) |
212 |
+ # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename |
213 |
+ # raise ValueError, 'unknown locale: %s' % localename |
214 |
+ #ValueError: unknown locale: 46 |
215 |
+ export -n LANG LANGUAGE ${!LC_*} |
216 |
+ export LC_ALL=C #684484 |
217 |
+ |
218 |
+ # Bug #295672 - Avoid sandbox violation in ~/.config by forcing |
219 |
+ # variables to point to our fake temporary $HOME. |
220 |
+ export HOME="${T}/fake_homedir" |
221 |
+ export XDG_CONFIG_HOME="${HOME}/.config" |
222 |
+ export XDG_DATA_HOME="${HOME}/.local/share" |
223 |
+ export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre" |
224 |
+ mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die |
225 |
+ |
226 |
+ tc-export CC CXX |
227 |
+ # Bug #334243 - respect LDFLAGS when building extensions |
228 |
+ export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" |
229 |
+ local libdir=$(get_libdir) |
230 |
+ [[ -n $libdir ]] || die "get_libdir returned an empty string" |
231 |
+ |
232 |
+ addpredict /dev/dri #665310 |
233 |
+ |
234 |
+ PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \ |
235 |
+ "${PYTHON}" setup.py install \ |
236 |
+ --root="${D}" \ |
237 |
+ --prefix="${EPREFIX}/usr" \ |
238 |
+ --libdir="${EPREFIX}/usr/${libdir}" \ |
239 |
+ --staging-root="${ED}/usr" \ |
240 |
+ --staging-libdir="${ED}/usr/${libdir}" || die |
241 |
+ |
242 |
+ rm "${ED}/usr/share/applications/defaults.list" || die |
243 |
+ find "${ED}"/usr/share -type d -empty -delete |
244 |
+ |
245 |
+ cd "${ED}"/usr/share/calibre/fonts/liberation || die |
246 |
+ local x |
247 |
+ for x in * ; do |
248 |
+ [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue |
249 |
+ ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die |
250 |
+ done |
251 |
+ |
252 |
+ einfo "Converting python shebangs" |
253 |
+ python_fix_shebang --force "${ED}" |
254 |
+ |
255 |
+ einfo "Compiling python modules" |
256 |
+ python_optimize "${ED}"/usr/lib/calibre |
257 |
+ |
258 |
+ newinitd "${FILESDIR}"/calibre-server-3.init calibre-server |
259 |
+ newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server |
260 |
+ |
261 |
+ bashcomp_alias calibre \ |
262 |
+ lrfviewer \ |
263 |
+ calibre-debug \ |
264 |
+ ebook-meta \ |
265 |
+ calibre-server \ |
266 |
+ ebook-viewer \ |
267 |
+ ebook-polish \ |
268 |
+ fetch-ebook-metadata \ |
269 |
+ lrf2lrs \ |
270 |
+ ebook-convert \ |
271 |
+ ebook-edit \ |
272 |
+ calibre-smtp \ |
273 |
+ ebook-device |
274 |
+ |
275 |
+} |
276 |
+ |
277 |
+pkg_preinst() { |
278 |
+ # Indentify stray directories from upstream's "Binary install" |
279 |
+ # method (see bug 622728). |
280 |
+ CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre |
281 |
+ CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do |
282 |
+ printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}" |
283 |
+} |
284 |
+ |
285 |
+pkg_postinst() { |
286 |
+ [[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset" |
287 |
+ local x |
288 |
+ for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do |
289 |
+ if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then |
290 |
+ elog "Purging '${x}'" |
291 |
+ rm -rf "${x}" |
292 |
+ fi |
293 |
+ done |
294 |
+ xdg_desktop_database_update |
295 |
+ xdg_mimeinfo_database_update |
296 |
+ xdg_icon_cache_update |
297 |
+} |
298 |
+ |
299 |
+pkg_postrm() { |
300 |
+ xdg_desktop_database_update |
301 |
+ xdg_mimeinfo_database_update |
302 |
+ xdg_icon_cache_update |
303 |
+} |