Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/calibre: calibre-0.8.8.ebuild ChangeLog calibre-0.8.4.ebuild
Date: Sat, 02 Jul 2011 00:36:07
Message-Id: 20110702003556.487EE2004B@flycatcher.gentoo.org
1 zmedico 11/07/02 00:35:56
2
3 Modified: ChangeLog
4 Added: calibre-0.8.8.ebuild
5 Removed: calibre-0.8.4.ebuild
6 Log:
7 *calibre-0.8.8 (02 Jul 2011)
8
9 02 Jul 2011; Zac Medico <zmedico@g.o> +calibre-0.8.8.ebuild:
10 0.8.8 version bump.
11
12 02 Jul 2011; Zac Medico <zmedico@g.o> -calibre-0.8.4.ebuild:
13 Remove old version.
14
15 (Portage version: 2.2.0_alpha43/cvs/Linux i686)
16
17 Revision Changes Path
18 1.155 app-text/calibre/ChangeLog
19
20 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.155&view=markup
21 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.155&content-type=text/plain
22 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.154&r2=1.155
23
24 Index: ChangeLog
25 ===================================================================
26 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
27 retrieving revision 1.154
28 retrieving revision 1.155
29 diff -u -r1.154 -r1.155
30 --- ChangeLog 20 Jun 2011 19:41:50 -0000 1.154
31 +++ ChangeLog 2 Jul 2011 00:35:56 -0000 1.155
32 @@ -1,6 +1,14 @@
33 # ChangeLog for app-text/calibre
34 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
35 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.154 2011/06/20 19:41:50 zmedico Exp $
36 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.155 2011/07/02 00:35:56 zmedico Exp $
37 +
38 +*calibre-0.8.8 (02 Jul 2011)
39 +
40 + 02 Jul 2011; Zac Medico <zmedico@g.o> +calibre-0.8.8.ebuild:
41 + 0.8.8 version bump.
42 +
43 + 02 Jul 2011; Zac Medico <zmedico@g.o> -calibre-0.8.4.ebuild:
44 + Remove old version.
45
46 *calibre-0.8.6 (20 Jun 2011)
47
48
49
50
51 1.1 app-text/calibre/calibre-0.8.8.ebuild
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.8.ebuild?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.8.ebuild?rev=1.1&content-type=text/plain
55
56 Index: calibre-0.8.8.ebuild
57 ===================================================================
58 # Copyright 1999-2011 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 # $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.8.8.ebuild,v 1.1 2011/07/02 00:35:56 zmedico Exp $
61
62 EAPI=3
63 PYTHON_DEPEND=2:2.7
64 PYTHON_USE_WITH=sqlite
65
66 inherit python distutils eutils fdo-mime bash-completion multilib
67
68 DESCRIPTION="Ebook management application."
69 HOMEPAGE="http://calibre-ebook.com/"
70 SRC_URI="http://sourceforge.net/projects/calibre/files/${PV}/${P}.tar.gz"
71
72 LICENSE="GPL-2"
73
74 KEYWORDS="~amd64 ~x86"
75
76 SLOT="0"
77
78 IUSE=""
79
80 COMMON_DEPEND="
81 >=app-text/podofo-0.8.2
82 >=app-text/poppler-0.12.3-r3[qt4,xpdf-headers]
83 >=dev-libs/chmlib-0.40
84 >=dev-libs/icu-4.4
85 >=dev-python/beautifulsoup-3.0.5:python-2
86 >=dev-python/dnspython-1.6.0
87 >=dev-python/cssutils-0.9.7_alpha3
88 >=dev-python/dbus-python-0.82.2
89 >=dev-python/imaging-1.1.6
90 >=dev-python/lxml-2.2.1
91 >=dev-python/mechanize-0.1.11
92 >=dev-python/python-dateutil-1.4.1
93 >=dev-python/PyQt4-4.8.2[X,svg,webkit]
94 >=media-gfx/imagemagick-6.5.9
95 >=media-libs/libwmf-0.2.8
96 virtual/libusb:0
97 >=x11-misc/xdg-utils-1.0.2"
98
99 RDEPEND="${COMMON_DEPEND}
100 >=dev-python/reportlab-2.1"
101
102 DEPEND="${COMMON_DEPEND}
103 >=dev-python/setuptools-0.6_rc5
104 >=gnome-base/librsvg-2.0.0
105 >=x11-misc/xdg-utils-1.0.2-r2"
106
107 S=${WORKDIR}/${PN}
108
109 pkg_setup() {
110 python_set_active_version 2.7
111 }
112
113 src_prepare() {
114 # Fix outdated version constant.
115 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
116 # -i src/calibre/constants.py || \
117 # die "sed failed to patch constants.py"
118
119 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
120 # calls xdg-* (bug #258938).
121 sed -e "s:'xdg-desktop-menu', 'install':\\0, '--mode', 'user':" \
122 -e "s:check_call(\\['xdg-desktop-menu', 'forceupdate'\\]):#\\0:" \
123 -e "s:xdg-icon-resource install:\\0 --mode user:" \
124 -e "s:xdg-mime install:\\0 --mode user:" \
125 -i src/calibre/linux.py || die "sed failed to patch linux.py"
126
127 # Disable unnecessary privilege dropping for bug #287067.
128 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
129 -i setup/install.py || die "sed failed to patch install.py"
130
131 distutils_src_prepare
132 }
133
134 src_install() {
135
136 # Bypass kbuildsycoca and update-mime-database in order to
137 # avoid sandbox violations if xdg-mime tries to call them.
138 cat - > "${T}/kbuildsycoca" <<-EOF
139 #!${BASH}
140 exit 0
141 EOF
142
143 cp "${T}"/{kbuildsycoca,update-mime-database}
144 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
145
146 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
147 # violation with kbuildsycoca as in bug #287067, comment #13.
148 export -n DISPLAY
149
150 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
151 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
152 # return _parse_localename(localename)
153 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
154 # raise ValueError, 'unknown locale: %s' % localename
155 #ValueError: unknown locale: 46
156 export -n LANGUAGE
157
158 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
159 # variables to point to our fake temporary $HOME.
160 export HOME="${T}/fake_homedir"
161 export XDG_CONFIG_HOME="${HOME}/.config"
162 export XDG_DATA_HOME="${HOME}/.local/share"
163 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
164 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
165
166 # Bug #334243 - respect LDFLAGS when building calibre-mount-helper
167 export OVERRIDE_CFLAGS="$CFLAGS $LDFLAGS"
168 local libdir=$(get_libdir)
169 [[ -n $libdir ]] || die "get_libdir returned an empty string"
170
171 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
172 distutils_src_install \
173 --staging-root="${D}usr" \
174 --staging-libdir="${D}usr/${libdir}"
175
176 grep -rlZ "${D}" "${D}" | xargs -0 sed -e "s:${D}:/:g" -i ||
177 die "failed to fix harcoded \$D in paths"
178
179 grep -rlZ "/usr/lib/calibre" "${D}" | \
180 xargs -0 sed -e "s:/usr/lib/calibre:/usr/${libdir}/calibre:g" -i ||
181 die "failed to fix harcoded libdir paths"
182
183 find "${D}"usr/share/calibre/man -type f -print0 | \
184 while read -r -d $'\0' ; do
185 if [[ ${REPLY} = *.[0-9]calibre.bz2 ]] ; then
186 newname=${REPLY%calibre.bz2}.bz2
187 mv "${REPLY}" "${newname}"
188 doman "${newname}" || die "doman failed"
189 rm -f "${newname}" || die "rm failed"
190 fi
191 done
192 rmdir "${D}"usr/share/calibre/man/* || \
193 die "could not remove redundant man subdir(s)"
194 rmdir "${D}"usr/share/calibre/man || \
195 die "could not remove redundant man dir"
196
197 # The menu entries end up here due to '--mode user' being added to
198 # xdg-* options in src_prepare.
199 dodir /usr/share/mime/packages
200 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
201 mv "${HOME}"/.local/share/mime/packages/* "${D}"usr/share/mime/packages/ ||
202 die "failed to register mime types"
203 dodir /usr/share/icons
204 mv "${HOME}"/.local/share/icons/* "${D}"usr/share/icons/ ||
205 die "failed to install icon files"
206
207 domenu "${HOME}"/.local/share/applications/*.desktop ||
208 die "failed to install .desktop menu files"
209
210 dobashcompletion "${D}"usr/etc/bash_completion.d/calibre
211 rm -r "${D}"usr/etc/bash_completion.d
212 find "${D}"usr/etc -type d -empty -delete
213
214 python_convert_shebangs -r $(python_get_version) "${D}"
215 }
216
217 pkg_postinst() {
218 fdo-mime_desktop_database_update
219 fdo-mime_mime_database_update
220 python_mod_optimize /usr/$(get_libdir)/${PN}
221 bash-completion_pkg_postinst
222 }
223
224 pkg_postrm() {
225 python_mod_cleanup /usr/$(get_libdir)/${PN}
226 }