Gentoo Archives: gentoo-commits

From: "Ben de Groot (yngwin)" <yngwin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/calibre: calibre-2.31.0.ebuild ChangeLog
Date: Wed, 01 Jul 2015 08:40:50
Message-Id: 20150701084042.E5DD7741@oystercatcher.gentoo.org
1 yngwin 15/07/01 08:40:42
2
3 Modified: ChangeLog
4 Added: calibre-2.31.0.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x4FDF9CFD2FAC514E!)
9
10 Revision Changes Path
11 1.347 app-text/calibre/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.347&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.347&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.346&r2=1.347
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
20 retrieving revision 1.346
21 retrieving revision 1.347
22 diff -u -r1.346 -r1.347
23 --- ChangeLog 2 May 2015 14:39:13 -0000 1.346
24 +++ ChangeLog 1 Jul 2015 08:40:42 -0000 1.347
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-text/calibre
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.346 2015/05/02 14:39:13 yngwin Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.347 2015/07/01 08:40:42 yngwin Exp $
30 +
31 +*calibre-2.31.0 (01 Jul 2015)
32 +
33 + 01 Jul 2015; Ben de Groot <yngwin@g.o> +calibre-2.31.0.ebuild:
34 + version bump
35
36 *calibre-2.27.0 (02 May 2015)
37
38
39
40
41 1.1 app-text/calibre/calibre-2.31.0.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-2.31.0.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-2.31.0.ebuild?rev=1.1&content-type=text/plain
45
46 Index: calibre-2.31.0.ebuild
47 ===================================================================
48 # Copyright 1999-2015 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-2.31.0.ebuild,v 1.1 2015/07/01 08:40:42 yngwin Exp $
51
52 EAPI=5
53 inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
54
55 DESCRIPTION="Ebook management application"
56 HOMEPAGE="http://calibre-ebook.com/"
57 [[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
58 SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
59
60 LICENSE="
61 GPL-3+
62 GPL-3
63 GPL-2+
64 GPL-2
65 GPL-1+
66 LGPL-3+
67 LGPL-2.1+
68 LGPL-2.1
69 BSD
70 MIT
71 Old-MIT
72 Apache-2.0
73 public-domain
74 || ( Artistic GPL-1+ )
75 CC-BY-3.0
76 OFL-1.1
77 PSF-2
78 unRAR
79 "
80 KEYWORDS="~amd64 ~arm ~x86"
81 SLOT="0"
82 IUSE="+udisks"
83
84 COMMON_DEPEND="
85 >=app-text/podofo-0.8.2:=
86 >=app-text/poppler-0.26.5[qt5]
87 >=dev-lang/python-2.7.1:2.7[sqlite,ssl]
88 >=dev-libs/chmlib-0.40:=
89 dev-libs/glib:2
90 >=dev-libs/icu-4.4:=
91 >=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
92 >=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
93 >=dev-python/dnspython-1.6.0[python_targets_python2_7(-)]
94 >=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
95 >=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
96 >=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
97 >=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
98 >=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
99 dev-python/netifaces[python_targets_python2_7(-)]
100 dev-python/psutil[python_targets_python2_7(-)]
101 >=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
102 >=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
103 >=dev-python/PyQt5-5.2.0[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
104 dev-qt/qtcore:5
105 dev-qt/qtgui:5
106 dev-qt/qtwidgets:5
107 media-fonts/liberation-fonts
108 >=media-gfx/imagemagick-6.5.9[jpeg,png]
109 media-libs/fontconfig
110 >=media-libs/freetype-2:=
111 >=media-libs/libmtp-1.1.5:=
112 >=media-libs/libwmf-0.2.8
113 sys-libs/zlib
114 virtual/libusb:1=
115 virtual/python-imaging[python_targets_python2_7(-)]
116 x11-libs/libX11
117 x11-libs/libXext
118 x11-libs/libXrender
119 >=x11-misc/xdg-utils-1.0.2-r2
120 udisks? ( virtual/libudev )"
121 RDEPEND="${COMMON_DEPEND}
122 udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
123 DEPEND="${COMMON_DEPEND}
124 >=dev-python/setuptools-0.6_rc5
125 >=virtual/podofo-build-0.8.2"
126
127 src_prepare() {
128 # Fix outdated version constant.
129 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
130 # -i src/calibre/constants.py || \
131 # die "sed failed to patch constants.py"
132
133 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
134 # calls xdg-* (bug #258938).
135 sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
136 -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
137 -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
138 -e "s|PreserveMIMEDefaults():||" \
139 -e "s|xdg-icon-resource install|\\0 --mode user|" \
140 -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
141 -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
142 -i src/calibre/linux.py || die "sed failed to patch linux.py"
143
144 # Disable unnecessary privilege dropping for bug #287067.
145 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
146 -i setup/install.py || die "sed failed to patch install.py"
147
148 sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
149 \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
150 '-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
151 '-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
152 '-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
153 '-i', 'Makefile'])" \
154 -i setup/extensions.py || die "sed failed to patch extensions.py"
155
156 # use system beautifulsoup, instead of bundled
157 rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
158 || die "could not remove bundled beautifulsoup"
159 find "${S}" -type f -name \*.py -exec \
160 sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
161 || die "could not sed bundled beautifulsoup out of the source tree"
162
163 # avoid failure of xdg tools to recognize vendor prefix
164 sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
165 -e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
166 -e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
167 -i "${S}"/src/calibre/linux.py || die 'sed failed'
168
169 # no_updates: do not annoy user with "new version is availible all the time
170 # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
171 epatch \
172 "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
173 "${FILESDIR}/${PN}-disable_plugins.patch"
174 }
175
176 src_install() {
177 # Bypass kbuildsycoca and update-mime-database in order to
178 # avoid sandbox violations if xdg-mime tries to call them.
179 cat - > "${T}/kbuildsycoca" <<-EOF
180 #!${BASH}
181 echo $0 : $@
182 exit 0
183 EOF
184
185 cp "${T}"/{kbuildsycoca,update-mime-database}
186 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
187
188 export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
189
190 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
191 # violation with kbuildsycoca as in bug #287067, comment #13.
192 export -n DISPLAY
193
194 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
195 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
196 # return _parse_localename(localename)
197 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
198 # raise ValueError, 'unknown locale: %s' % localename
199 #ValueError: unknown locale: 46
200 export -n LANGUAGE
201
202 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
203 # variables to point to our fake temporary $HOME.
204 export HOME="${T}/fake_homedir"
205 export XDG_CONFIG_HOME="${HOME}/.config"
206 export XDG_DATA_HOME="${HOME}/.local/share"
207 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
208 mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
209
210 tc-export CC CXX
211 # Bug #334243 - respect LDFLAGS when building extensions
212 export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
213 local libdir=$(get_libdir)
214 [[ -n $libdir ]] || die "get_libdir returned an empty string"
215
216 # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
217 local x
218 for x in /dev/dri/card[0-9] ; do
219 [[ -e ${x} ]] && addpredict ${x}
220 done
221
222 dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
223 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
224 "${EPREFIX}"/usr/bin/python2.7 setup.py install \
225 --root="${D}" \
226 --prefix="${EPREFIX}/usr" \
227 --libdir="${EPREFIX}/usr/${libdir}" \
228 --staging-root="${ED}usr" \
229 --staging-libdir="${ED}usr/${libdir}" || die
230
231 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
232 die "failed to fix harcoded \$D in paths"
233
234 # The menu entries end up here due to '--mode user' being added to
235 # xdg-* options in src_prepare.
236 dodir /usr/share/mime/packages
237 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
238 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
239 die "failed to register mime types"
240 dodir /usr/share/icons
241 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
242 die "failed to install icon files"
243
244 domenu "${HOME}"/.local/share/applications/*.desktop ||
245 die "failed to install .desktop menu files"
246
247 find "${ED}"usr/share -type d -empty -delete
248
249 cd "${ED}"/usr/share/calibre/fonts/liberation || die
250 local x
251 for x in * ; do
252 [[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
253 ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
254 done
255
256 einfo "Converting python shebangs"
257 while read -r -d $'\0' ; do
258 local shebang=$(head -n1 "$REPLY")
259 if [[ ${shebang} == "#!"*python* ]] ; then
260 sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
261 die "sed failed"
262 fi
263 done < <(find "${ED}" -type f -print0)
264
265 einfo "Compiling python modules"
266 "${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
267 -d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
268
269 newinitd "${FILESDIR}"/calibre-server.init calibre-server
270 newconfd "${FILESDIR}"/calibre-server.conf calibre-server
271 }
272
273 pkg_postinst() {
274 fdo-mime_desktop_database_update
275 fdo-mime_mime_database_update
276 }