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: Sat, 06 Aug 2016 05:01:14
Message-Id: 1470459657.9a4ad159cdbeb37c76d40cc0f45b06debcafd6be.zmedico@gentoo
1 commit: 9a4ad159cdbeb37c76d40cc0f45b06debcafd6be
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 6 05:00:12 2016 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 6 05:00:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a4ad159
7
8 app-text/calibre: version bump to 2.63.0
9
10 Package-Manager: portage-2.3.0
11
12 app-text/calibre/Manifest | 1 +
13 app-text/calibre/calibre-2.63.0.ebuild | 251 +++++++++++++++++++++++++++++++++
14 2 files changed, 252 insertions(+)
15
16 diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
17 index 44edc12..ec9db11 100644
18 --- a/app-text/calibre/Manifest
19 +++ b/app-text/calibre/Manifest
20 @@ -2,3 +2,4 @@ DIST calibre-1.20.0.tar.xz 32430560 SHA256 475e09b1be4b9977240cbbe6743ab79da4b1f
21 DIST calibre-2.35.0.tar.xz 37470944 SHA256 7d883c7ed5cf7c3c2e53c4d18e3a67c15d8a0d3425df57919adb57132860518f SHA512 a693c23e93ad1086fe70b0cc7dcf43b1a9c004f045a3c2fac42f6a4b9f231d4f1e7b55c8bae133ac48389d4e233e245deb958365e9c0283cd8668f0f5a2326a2 WHIRLPOOL b07308d7bb9803a3a882aaf4143d287352aafae69383276d6ee95f7b92a8f65c50c8a5cdc6c242ae87d8faf13ad830fcea9e27364749614219bb221a3d6ac36a
22 DIST calibre-2.47.0.tar.xz 38924632 SHA256 048681cf6cb09b136017c6c99a1f1d908c6fcc3cdb2d40455cb4af8725395d0c SHA512 932ab2bae12ce128fa497bdd95d3c5f4f67e65bced5b73882f9b812cd9290c0a89c04c89ad3e1b421119c1ca88b5bfb7870a3060c91b5c8198e5ad709dbfdc96 WHIRLPOOL 15f4d3e19eafc57aabb526147926a4fa3343d340fcbc528df91ade6d82a7bfa6f993baee6224508c8dbf551d9640c16db71fc30c438675d09876b633dd3f6ea8
23 DIST calibre-2.55.0.tar.xz 39854472 SHA256 a3a4f2914d491ab8c63725c11272d53bb4a91d282e6e5c6e0f245cb94b138188 SHA512 f067c93f7b32dbb8f94e30831df1bf755c25edaeb9dd4793ec79941738e2431e5fe51219d169056b3bb1f71b4223e933cc29fdae6572f212109b44b696bd6af4 WHIRLPOOL 433c68117f2aec343db026851de1807ebbcef91b229cb7790a9a3de35bb9ea6e20c194097ab4b283935843d998aba61f5a036483d743e35b9cc8dffaa809c5fb
24 +DIST calibre-2.63.0.tar.xz 40700876 SHA256 0672a155edfafd50a507ebcfa20de2cfc23780e082eccbb89374f8aab3d98fe7 SHA512 74df6febe62608ab93502360e7511679102f0cbb260b1b78b4720c1aff34703d60db51a760ecd51596cb7331892d5eb7225e6ec70aa09976c219ba973d064f9b WHIRLPOOL 24238a8ffceae15fe2490d493aed77456a7db6940d19fe9c7f8acf426d09d6c28554ffbc2d38b5ce793097afeb5729b882ead55be9e93ca6010bcd7e66a58728
25
26 diff --git a/app-text/calibre/calibre-2.63.0.ebuild b/app-text/calibre/calibre-2.63.0.ebuild
27 new file mode 100644
28 index 0000000..23a7e98
29 --- /dev/null
30 +++ b/app-text/calibre/calibre-2.63.0.ebuild
31 @@ -0,0 +1,251 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +PYTHON_REQ_USE="sqlite,ssl"
40 +
41 +inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
42 +
43 +DESCRIPTION="Ebook management application"
44 +HOMEPAGE="http://calibre-ebook.com/"
45 +SRC_URI="http://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 + unRAR
66 +"
67 +KEYWORDS="~amd64 ~arm ~x86"
68 +SLOT="0"
69 +IUSE="+udisks"
70 +
71 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
72 +
73 +COMMON_DEPEND="${PYTHON_DEPS}
74 + >=app-text/podofo-0.8.2:=
75 + >=app-text/poppler-0.26.5[qt5]
76 + >=dev-libs/chmlib-0.40:=
77 + dev-libs/glib:2
78 + >=dev-libs/icu-4.4:=
79 + >=dev-python/apsw-3.7.17[${PYTHON_USEDEP}]
80 + >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}]
81 + >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
82 + >=dev-python/cssutils-0.9.9[${PYTHON_USEDEP}]
83 + >=dev-python/dbus-python-1.2.0[${PYTHON_USEDEP}]
84 + >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}]
85 + >=dev-python/mechanize-0.1.11[${PYTHON_USEDEP}]
86 + dev-python/netifaces[${PYTHON_USEDEP}]
87 + dev-python/pillow[${PYTHON_USEDEP}]
88 + dev-python/psutil[${PYTHON_USEDEP}]
89 + >=dev-python/pygments-2.0.1[${PYTHON_USEDEP}]
90 + >=dev-python/python-dateutil-1.4.1[${PYTHON_USEDEP}]
91 + >=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}]
92 + dev-qt/qtcore:5
93 + dev-qt/qtgui:5
94 + dev-qt/qtwidgets:5
95 + media-fonts/liberation-fonts
96 + >=media-gfx/imagemagick-6.5.9[jpeg,png]
97 + media-libs/fontconfig
98 + >=media-libs/freetype-2:=
99 + >=media-libs/libmtp-1.1.5:=
100 + >=media-libs/libwmf-0.2.8
101 + sys-libs/zlib
102 + virtual/libusb:1=
103 + virtual/python-dnspython[${PYTHON_USEDEP}]
104 + x11-libs/libX11
105 + x11-libs/libXext
106 + x11-libs/libXrender
107 + >=x11-misc/xdg-utils-1.0.2-r2
108 + udisks? ( virtual/libudev )"
109 +RDEPEND="${COMMON_DEPEND}
110 + udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
111 +DEPEND="${COMMON_DEPEND}
112 + >=dev-python/setuptools-0.6_rc5[${PYTHON_USEDEP}]
113 + >=virtual/podofo-build-0.8.2
114 + virtual/pkgconfig"
115 +
116 +src_prepare() {
117 + # no_updates: do not annoy user with "new version is availible all the time
118 + # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
119 + eapply \
120 + "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
121 + "${FILESDIR}/${PN}-disable_plugins.patch"
122 +
123 + eapply_user
124 +
125 + # Fix outdated version constant.
126 + #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
127 + # -i src/calibre/constants.py || \
128 + # die "sed failed to patch constants.py"
129 +
130 + # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
131 + # calls xdg-* (bug #258938).
132 + sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
133 + -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
134 + -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
135 + -e "s|, PreserveMIMEDefaults():|:|" \
136 + -e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
137 + -e "s|cmd\[2\]|cmd[4]|" \
138 + -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
139 + -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
140 + -i src/calibre/linux.py || die "sed failed to patch linux.py"
141 +
142 + # Disable unnecessary privilege dropping for bug #287067.
143 + sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
144 + -i setup/install.py || die "sed failed to patch install.py"
145 +
146 + sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
147 +\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
148 +'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
149 +'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
150 +'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
151 +'-i', 'Makefile'])" \
152 + -i setup/build.py || die "sed failed to patch build.py"
153 +
154 + # use system beautifulsoup, instead of bundled
155 + rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
156 + || die "could not remove bundled beautifulsoup"
157 + find "${S}" -type f -name \*.py -exec \
158 + sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
159 + || die "could not sed bundled beautifulsoup out of the source tree"
160 +
161 + # avoid failure of xdg tools to recognize vendor prefix
162 + sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
163 + -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
164 + -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
165 + -i "${S}"/src/calibre/linux.py || die 'sed failed'
166 +}
167 +
168 +src_install() {
169 + # Bypass kbuildsycoca and update-mime-database in order to
170 + # avoid sandbox violations if xdg-mime tries to call them.
171 + cat - > "${T}/kbuildsycoca" <<-EOF
172 + #!${BASH}
173 + echo $0 : $@
174 + exit 0
175 + EOF
176 +
177 + cp "${T}"/{kbuildsycoca,update-mime-database} || die
178 + chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die
179 +
180 + export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
181 +
182 + # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
183 + # violation with kbuildsycoca as in bug #287067, comment #13.
184 + export -n DISPLAY
185 +
186 + # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
187 + # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
188 + # return _parse_localename(localename)
189 + # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
190 + # raise ValueError, 'unknown locale: %s' % localename
191 + #ValueError: unknown locale: 46
192 + export -n LANGUAGE
193 +
194 + # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
195 + # variables to point to our fake temporary $HOME.
196 + export HOME="${T}/fake_homedir"
197 + export XDG_CONFIG_HOME="${HOME}/.config"
198 + export XDG_DATA_HOME="${HOME}/.local/share"
199 + export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
200 + mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
201 +
202 + tc-export CC CXX
203 + # Bug #334243 - respect LDFLAGS when building extensions
204 + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
205 + local libdir=$(get_libdir)
206 + [[ -n $libdir ]] || die "get_libdir returned an empty string"
207 +
208 + # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
209 + local x
210 + for x in /dev/dri/card[0-9] ; do
211 + [[ -e ${x} ]] && addpredict ${x}
212 + done
213 +
214 + #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
215 + #dodir $(python_get_sitedir)
216 + PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
217 + "${PYTHON}" setup.py install \
218 + --root="${D}" \
219 + --prefix="${EPREFIX}/usr" \
220 + --libdir="${EPREFIX}/usr/${libdir}" \
221 + --staging-root="${ED}usr" \
222 + --staging-libdir="${ED}usr/${libdir}" || die
223 +
224 + grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
225 + die "failed to fix harcoded \$D in paths"
226 +
227 + # The menu entries end up here due to '--mode user' being added to
228 + # xdg-* options in src_prepare.
229 + dodir /usr/share/mime/packages
230 + chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
231 + mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
232 + die "failed to register mime types"
233 + dodir /usr/share/icons
234 + mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
235 + die "failed to install icon files"
236 +
237 + domenu "${HOME}"/.local/share/applications/*.desktop ||
238 + die "failed to install .desktop menu files"
239 +
240 + find "${ED}"usr/share -type d -empty -delete
241 +
242 + cd "${ED}"/usr/share/calibre/fonts/liberation || die
243 + local x
244 + for x in * ; do
245 + [[ -f ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue
246 + ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
247 + done
248 +
249 + einfo "Converting python shebangs"
250 + python_fix_shebang "${ED}"
251 +
252 + einfo "Compiling python modules"
253 + python_optimize "${ED}"usr/lib/calibre
254 +
255 + newinitd "${FILESDIR}"/calibre-server.init calibre-server
256 + newconfd "${FILESDIR}"/calibre-server.conf calibre-server
257 +
258 + bashcomp_alias calibre \
259 + lrfviewer \
260 + calibre-debug \
261 + ebook-meta \
262 + calibre-server \
263 + ebook-viewer \
264 + ebook-polish \
265 + fetch-ebook-metadata \
266 + lrf2lrs \
267 + ebook-convert \
268 + ebook-edit \
269 + calibre-smtp \
270 + ebook-device
271 +
272 +}
273 +
274 +pkg_postinst() {
275 + fdo-mime_desktop_database_update
276 + fdo-mime_mime_database_update
277 +}
278 +
279 +pkg_postrm() {
280 + fdo-mime_desktop_database_update
281 + fdo-mime_mime_database_update
282 +}