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