Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/
Date: Fri, 02 Jun 2017 14:30:23
Message-Id: 1496413812.866442b713d66e517d2f97277653e207f78234d7.zmedico@gentoo
1 commit: 866442b713d66e517d2f97277653e207f78234d7
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 2 14:26:18 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 2 14:30:12 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=866442b7
7
8 app-text/calibre: version bump to 2.85.1
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 app-text/calibre/Manifest | 1 +
13 app-text/calibre/calibre-2.85.1.ebuild | 257 +++++++++++++++++++++++++++++++++
14 2 files changed, 258 insertions(+)
15
16 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
17 index 75a2bdcf089..d6f8892a702 100644
18 --- a/app-text/calibre/Manifest
19 +++ b/app-text/calibre/Manifest
20 @@ -2,3 +2,4 @@ DIST calibre-2.78.0.tar.xz 38739404 SHA256 d2b0b0c5451d3ac05ce9de0b801ddf8de7664
21 DIST calibre-2.80.0.tar.xz 38781996 SHA256 33a6dbc578c7a2f3d1c97253769506a1afc10f688c062f027d64d7081618f2b1 SHA512 9dc874cd7bfcc883514e354a494a83c63d19b88980df8f28fc03b57d3ebaafb45dad36f0d61e8ef08d363ed18a7bd953e8d624c69f0c3d7f7d66308fceac8982 WHIRLPOOL b40701e810d9a9fab333f420bb1f14a89ac55dd7397407d4f31837efc97d323f74b94181436b8038004e404aff6e9c5696deee89daf1cd949e5659dbe43207c4
22 DIST calibre-2.83.0.tar.xz 38875672 SHA256 96166e8c74047cfbae9289c38ab5e2f661168048e568cd187f908242d98426ab SHA512 a28aa52379bc317e648087b28859a8e2c50dd4e2ccb3352e135f896ad95ab9c85c1fba162fe3acd5056be80e7c4e9481ea1396cb638661cfdb27795051124821 WHIRLPOOL bcce15cbfdcf78a56a24f931ae4eed688c7409af0455e9f1ca7aaf00751fa0b4a55e570501bc1b10d02a8e8397df979a18a999b4ddbbb645a7a376cded76cbec
23 DIST calibre-2.84.0.tar.xz 37770832 SHA256 75a6c2f142ccee594d6e208c4c7f57e137e2c4f06c81d36d5bc42f0dcdaa76cf SHA512 83bd3b6393f7d7bf6f5bb8496444b5973df144dcf9be8d7e0b1fb21ec456a30c2abb5cf4090ecaa18cf97ffc9272e483a89ee3bbd294c5a31d1228e7b44fd275 WHIRLPOOL 0cf17f586a861f44cf0ed5cc0782f490d28e4e02b0ebef61fa256771b198a7cd8f30bc483a84485eff8c91daa9fd88ad0f8d571a7445084be99d27ddfbbbf76c
24 +DIST calibre-2.85.1.tar.xz 37783284 SHA256 8c8db280c51b26284bff1c066fb503ecef9e1f15f7e2e7b4f705c817ee041abd SHA512 ce29924213fa7461bbf2fc62f26bd53e4eafdf3b0dd58e241071592be4ee038cdb3ac6ac2982229dd0e52595a93aca7d921640ea55796950d1f3ac3c2742af4f WHIRLPOOL 1432f71c19c8ff41dede3370287813281557f3659c862e7a9fe76d548bf393d8dd889aa4dc92d514244b2d35ce25b962c2942ef3dec2bf1ebaa81b1ea6bd0c94
25
26 diff --git a/app-text/calibre/calibre-2.85.1.ebuild b/app-text/calibre/calibre-2.85.1.ebuild
27 new file mode 100644
28 index 00000000000..8bbbb010548
29 --- /dev/null
30 +++ b/app-text/calibre/calibre-2.85.1.ebuild
31 @@ -0,0 +1,257 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +PYTHON_COMPAT=( python2_7 )
38 +PYTHON_REQ_USE="sqlite,ssl"
39 +
40 +inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
41 +
42 +DESCRIPTION="Ebook management application"
43 +HOMEPAGE="http://calibre-ebook.com/"
44 +SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz"
45 +
46 +LICENSE="
47 + GPL-3+
48 + GPL-3
49 + GPL-2+
50 + GPL-2
51 + GPL-1+
52 + LGPL-3+
53 + LGPL-2.1+
54 + LGPL-2.1
55 + BSD
56 + MIT
57 + Old-MIT
58 + Apache-2.0
59 + public-domain
60 + || ( Artistic GPL-1+ )
61 + CC-BY-3.0
62 + OFL-1.1
63 + PSF-2
64 + unRAR
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/podofo-0.8.2:=
74 + >=app-text/poppler-0.26.5[qt5]
75 + >=dev-libs/chmlib-0.40:=
76 + dev-libs/glib:2
77 + >=dev-libs/icu-57.1:=
78 + >=dev-python/apsw-3.13.0[${PYTHON_USEDEP}]
79 + >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}]
80 + >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
81 + >=dev-python/cssutils-1.0.1[${PYTHON_USEDEP}]
82 + >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
83 + >=dev-libs/dbus-glib-0.106
84 + >=sys-apps/dbus-1.10.8
85 + >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}]
86 + >=dev-python/mechanize-0.2.5[${PYTHON_USEDEP}]
87 + dev-python/netifaces[${PYTHON_USEDEP}]
88 + dev-python/pillow[${PYTHON_USEDEP}]
89 + dev-python/psutil[${PYTHON_USEDEP}]
90 + >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}]
91 + >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
92 + >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}]
93 + dev-qt/qtcore:5
94 + dev-qt/qtgui:5
95 + dev-qt/qtwidgets:5
96 + media-fonts/liberation-fonts
97 + >=media-gfx/imagemagick-6.5.9[jpeg,png]
98 + media-libs/fontconfig
99 + >=media-libs/freetype-2:=
100 + >=media-libs/libmtp-1.1.11:=
101 + >=media-libs/libwmf-0.2.8
102 + >=media-gfx/optipng-0.7.6
103 + sys-libs/zlib
104 + virtual/libusb:1=
105 + virtual/python-dnspython[${PYTHON_USEDEP}]
106 + x11-libs/libX11
107 + x11-libs/libXext
108 + x11-libs/libXrender
109 + >=x11-misc/xdg-utils-1.0.2-r2
110 + ios? (
111 + >=app-pda/usbmuxd-1.0.8
112 + >=app-pda/libimobiledevice-1.2.0
113 + )
114 + udisks? ( virtual/libudev )"
115 +RDEPEND="${COMMON_DEPEND}
116 + udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
117 +DEPEND="${COMMON_DEPEND}
118 + >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
119 + >=virtual/podofo-build-0.9.4
120 + virtual/pkgconfig"
121 +
122 +src_prepare() {
123 + # no_updates: do not annoy user with "new version is availible all the time
124 + # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
125 + eapply \
126 + "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
127 + "${FILESDIR}/${PN}-disable_plugins.patch"
128 +
129 + eapply_user
130 +
131 + # Fix outdated version constant.
132 + #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
133 + # -i src/calibre/constants.py || \
134 + # die "sed failed to patch constants.py"
135 +
136 + # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
137 + # calls xdg-* (bug #258938).
138 + sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
139 + -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
140 + -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
141 + -e "s|, PreserveMIMEDefaults():|:|" \
142 + -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
143 + -e "s|cmd\[2\]|cmd[4]|" \
144 + -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
145 + -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
146 + -i src/calibre/linux.py || die "sed failed to patch linux.py"
147 +
148 + # Disable unnecessary privilege dropping for bug #287067.
149 + sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
150 + -i setup/install.py || die "sed failed to patch install.py"
151 +
152 + sed -e "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
153 +\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
154 +'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
155 +'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
156 +'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
157 +'-i', 'Makefile'])" \
158 + -i setup/build.py || die "sed failed to patch build.py"
159 +
160 + # use system beautifulsoup, instead of bundled
161 + rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
162 + || die "could not remove bundled beautifulsoup"
163 + find "${S}" -type f -name \*.py -exec \
164 + sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
165 + || die "could not sed bundled beautifulsoup out of the source tree"
166 +
167 + # avoid failure of xdg tools to recognize vendor prefix
168 + sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
169 + -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
170 + -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
171 + -i "${S}"/src/calibre/linux.py || die 'sed failed'
172 +
173 + # don't create/install uninstaller
174 + sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die
175 +}
176 +
177 +src_install() {
178 + # Bypass kbuildsycoca and update-mime-database in order to
179 + # avoid sandbox violations if xdg-mime tries to call them.
180 + cat - > "${T}/kbuildsycoca" <<-EOF
181 + #!${BASH}
182 + echo $0 : $@
183 + exit 0
184 + EOF
185 +
186 + cp "${T}"/{kbuildsycoca,update-mime-database} || die
187 + chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die
188 +
189 + export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
190 +
191 + # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
192 + # violation with kbuildsycoca as in bug #287067, comment #13.
193 + export -n DISPLAY
194 +
195 + # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
196 + # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
197 + # return _parse_localename(localename)
198 + # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
199 + # raise ValueError, 'unknown locale: %s' % localename
200 + #ValueError: unknown locale: 46
201 + export -n LANGUAGE
202 +
203 + # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
204 + # variables to point to our fake temporary $HOME.
205 + export HOME="${T}/fake_homedir"
206 + export XDG_CONFIG_HOME="${HOME}/.config"
207 + export XDG_DATA_HOME="${HOME}/.local/share"
208 + export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
209 + mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
210 +
211 + tc-export CC CXX
212 + # Bug #334243 - respect LDFLAGS when building extensions
213 + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
214 + local libdir=$(get_libdir)
215 + [[ -n $libdir ]] || die "get_libdir returned an empty string"
216 +
217 + # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
218 + local x
219 + for x in /dev/dri/card[0-9] ; do
220 + [[ -e ${x} ]] && addpredict ${x}
221 + done
222 +
223 + #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
224 + #dodir $(python_get_sitedir)
225 + PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
226 + "${PYTHON}" setup.py install \
227 + --root="${D}" \
228 + --prefix="${EPREFIX}/usr" \
229 + --libdir="${EPREFIX}/usr/${libdir}" \
230 + --staging-root="${ED}usr" \
231 + --staging-libdir="${ED}usr/${libdir}" || die
232 +
233 + # The menu entries end up here due to '--mode user' being added to
234 + # xdg-* options in src_prepare.
235 + dodir /usr/share/mime/packages
236 + chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
237 + mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
238 + die "failed to register mime types"
239 + dodir /usr/share/icons
240 + mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
241 + die "failed to install icon files"
242 +
243 + domenu "${HOME}"/.local/share/applications/*.desktop ||
244 + die "failed to install .desktop menu files"
245 +
246 + find "${ED}"usr/share -type d -empty -delete
247 +
248 + cd "${ED}"/usr/share/calibre/fonts/liberation || die
249 + local x
250 + for x in * ; do
251 + [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue
252 + ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
253 + done
254 +
255 + einfo "Converting python shebangs"
256 + python_fix_shebang "${ED}"
257 +
258 + einfo "Compiling python modules"
259 + python_optimize "${ED}"usr/lib/calibre
260 +
261 + newinitd "${FILESDIR}"/calibre-server.init calibre-server
262 + newconfd "${FILESDIR}"/calibre-server.conf calibre-server
263 +
264 + bashcomp_alias calibre \
265 + lrfviewer \
266 + calibre-debug \
267 + ebook-meta \
268 + calibre-server \
269 + ebook-viewer \
270 + ebook-polish \
271 + fetch-ebook-metadata \
272 + lrf2lrs \
273 + ebook-convert \
274 + ebook-edit \
275 + calibre-smtp \
276 + ebook-device
277 +
278 +}
279 +
280 +pkg_postinst() {
281 + fdo-mime_desktop_database_update
282 + fdo-mime_mime_database_update
283 +}
284 +
285 +pkg_postrm() {
286 + fdo-mime_desktop_database_update
287 + fdo-mime_mime_database_update
288 +}