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