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