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: Wed, 08 Feb 2017 07:08:10
Message-Id: 1486537676.f6ec1239d27b0f7610e4f258ae699a61323b9464.zmedico@gentoo
1 commit: f6ec1239d27b0f7610e4f258ae699a61323b9464
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 8 07:04:38 2017 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 8 07:07:56 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6ec1239
7
8 app-text/calibre: version bump to 2.78.0
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 app-text/calibre/Manifest | 1 +
13 app-text/calibre/calibre-2.78.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 62f6ece..b19dca1 100644
18 --- a/app-text/calibre/Manifest
19 +++ b/app-text/calibre/Manifest
20 @@ -1,3 +1,4 @@
21 DIST calibre-1.20.0.tar.xz 32430560 SHA256 475e09b1be4b9977240cbbe6743ab79da4b1f1afe3fe6015d212d868e8f2fac4 SHA512 84ac25080cf4948398b79f9a1af688cca9cf9a5a9200b2aad649f5fda1cd0556be4ade0c8b09ea6ffcc95654eac0aaaa5b8f8ed6ea9830174bc150e64de85e31 WHIRLPOOL 61b6ecde2e3f8679c1afea95dcd152a94ce03522c06dff34b406a5705f6255243f0565fbb5f9bef3ac96d7127190bd1b4363233fa24fafcd0412e061201f6fe8
22 DIST calibre-2.70.0.tar.xz 40279720 SHA256 90391605c43db01acd7acf21707f5aa95c329b2055cca1b09b6fa46e050b3ba2 SHA512 1b98cdbd32dd02e64792b5e02ceb010a694c5669b8de3b0d03994b6f1e03e10dfcff6462317e1abfd27ca4b0085897218a12d79dd82604dad8a156d2f0fa5317 WHIRLPOOL d9c61f8d3514631fb8907e2fb5d63e32c6626c9d2fa35a985810b035f5a74c68e0d4fa8a63164c566030190ed362092d4d2145ee5e406fda8d97bbf778afbc1d
23 DIST calibre-2.73.0.tar.xz 38674308 SHA256 ec05836d60ae6214c3dde22ec7f9340ab77b05eac25b0df5e245b43f553b1a9f SHA512 395ae04ca580b25ec5d72bf2134c073a9182eccf9c30b053a52e342ddf7bec27d2479acba8cde15da175dfd0b6f5f9add54c9a13d9da421c494b70de3217968d WHIRLPOOL b5de25d5c170578c21719e72ead9c2040d338a6e19d8d7af9f788392acf27989c00bf092a6e3f64e4422409bdf2639f1bbc61be088c5baee72b85fe16e9c4b0b
24 +DIST calibre-2.78.0.tar.xz 38739404 SHA256 d2b0b0c5451d3ac05ce9de0b801ddf8de7664fee45f273d7ee8445a1ec2f898b SHA512 0779ac385dde45ac4baee7cecb0916e245f3e1cf20662bad9d9a4278265390b1aa89c2b478601b57113e7de08a69343288488ee299e8b43332f0129e650aa0ca WHIRLPOOL 325fc344445078ef0df0a29b4cd8e32445a881ede89e3db87606166ff0c8b7db10b7cc34432e63c2bb49382537a5107686339b987f1be807d59a1786ddfd4a75
25
26 diff --git a/app-text/calibre/calibre-2.78.0.ebuild b/app-text/calibre/calibre-2.78.0.ebuild
27 new file mode 100644
28 index 00000000..56f8233
29 --- /dev/null
30 +++ b/app-text/calibre/calibre-2.78.0.ebuild
31 @@ -0,0 +1,251 @@
32 +# Copyright 1999-2017 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 + # don't create/install uninstaller
168 + sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die
169 +}
170 +
171 +src_install() {
172 + # Bypass kbuildsycoca and update-mime-database in order to
173 + # avoid sandbox violations if xdg-mime tries to call them.
174 + cat - > "${T}/kbuildsycoca" <<-EOF
175 + #!${BASH}
176 + echo $0 : $@
177 + exit 0
178 + EOF
179 +
180 + cp "${T}"/{kbuildsycoca,update-mime-database} || die
181 + chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die
182 +
183 + export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
184 +
185 + # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
186 + # violation with kbuildsycoca as in bug #287067, comment #13.
187 + export -n DISPLAY
188 +
189 + # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
190 + # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
191 + # return _parse_localename(localename)
192 + # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
193 + # raise ValueError, 'unknown locale: %s' % localename
194 + #ValueError: unknown locale: 46
195 + export -n LANGUAGE
196 +
197 + # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
198 + # variables to point to our fake temporary $HOME.
199 + export HOME="${T}/fake_homedir"
200 + export XDG_CONFIG_HOME="${HOME}/.config"
201 + export XDG_DATA_HOME="${HOME}/.local/share"
202 + export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
203 + mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
204 +
205 + tc-export CC CXX
206 + # Bug #334243 - respect LDFLAGS when building extensions
207 + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
208 + local libdir=$(get_libdir)
209 + [[ -n $libdir ]] || die "get_libdir returned an empty string"
210 +
211 + # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
212 + local x
213 + for x in /dev/dri/card[0-9] ; do
214 + [[ -e ${x} ]] && addpredict ${x}
215 + done
216 +
217 + #dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
218 + #dodir $(python_get_sitedir)
219 + PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
220 + "${PYTHON}" setup.py install \
221 + --root="${D}" \
222 + --prefix="${EPREFIX}/usr" \
223 + --libdir="${EPREFIX}/usr/${libdir}" \
224 + --staging-root="${ED}usr" \
225 + --staging-libdir="${ED}usr/${libdir}" || die
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 +}