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: ChangeLog calibre-0.8.21.ebuild calibre-0.8.18.ebuild
Date: Sat, 01 Oct 2011 01:44:26
Message-Id: 20111001014415.8555820036@flycatcher.gentoo.org
1 zmedico 11/10/01 01:44:15
2
3 Modified: ChangeLog
4 Added: calibre-0.8.21.ebuild
5 Removed: calibre-0.8.18.ebuild
6 Log:
7 *calibre-0.8.21 (01 Oct 2011)
8
9 01 Oct 2011; Zac Medico <zmedico@g.o> +calibre-0.8.21.ebuild:
10 0.8.21 version bump.
11
12 01 Oct 2011; Zac Medico <zmedico@g.o> -calibre-0.8.18.ebuild:
13 Removed old version.
14
15 (Portage version: 2.2.0_alpha60_p5/cvs/Linux i686)
16
17 Revision Changes Path
18 1.162 app-text/calibre/ChangeLog
19
20 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.162&view=markup
21 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.162&content-type=text/plain
22 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.161&r2=1.162
23
24 Index: ChangeLog
25 ===================================================================
26 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
27 retrieving revision 1.161
28 retrieving revision 1.162
29 diff -u -r1.161 -r1.162
30 --- ChangeLog 24 Sep 2011 03:55:00 -0000 1.161
31 +++ ChangeLog 1 Oct 2011 01:44:15 -0000 1.162
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.161 2011/09/24 03:55:00 zmedico Exp $
36 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.162 2011/10/01 01:44:15 zmedico Exp $
37 +
38 +*calibre-0.8.21 (01 Oct 2011)
39 +
40 + 01 Oct 2011; Zac Medico <zmedico@g.o> +calibre-0.8.21.ebuild:
41 + 0.8.21 version bump.
42 +
43 + 01 Oct 2011; Zac Medico <zmedico@g.o> -calibre-0.8.18.ebuild:
44 + Removed old version.
45
46 *calibre-0.8.20 (24 Sep 2011)
47
48
49
50
51 1.1 app-text/calibre/calibre-0.8.21.ebuild
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.21.ebuild?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.21.ebuild?rev=1.1&content-type=text/plain
55
56 Index: calibre-0.8.21.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.21.ebuild,v 1.1 2011/10/01 01:44:15 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-r1 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 # include poppler-features.h for POPPLER_*_VERSION
120 sed -e '/#include <PDFDoc.h>/ i\
121 #include <poppler/glib/poppler-features.h>' \
122 -i src/calibre/ebooks/pdf/reflow.h || die "sed failed to patch reflow.h"
123
124 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
125 # calls xdg-* (bug #258938).
126 sed -e "s:'xdg-desktop-menu', 'install':\\0, '--mode', 'user':" \
127 -e "s:check_call(\\['xdg-desktop-menu', 'forceupdate'\\]):#\\0:" \
128 -e "s:xdg-icon-resource install:\\0 --mode user:" \
129 -e "s:xdg-mime install:\\0 --mode user:" \
130 -i src/calibre/linux.py || die "sed failed to patch linux.py"
131
132 # Disable unnecessary privilege dropping for bug #287067.
133 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
134 -i setup/install.py || die "sed failed to patch install.py"
135
136 distutils_src_prepare
137 }
138
139 src_install() {
140
141 # Bypass kbuildsycoca and update-mime-database in order to
142 # avoid sandbox violations if xdg-mime tries to call them.
143 cat - > "${T}/kbuildsycoca" <<-EOF
144 #!${BASH}
145 exit 0
146 EOF
147
148 cp "${T}"/{kbuildsycoca,update-mime-database}
149 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
150
151 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
152 # violation with kbuildsycoca as in bug #287067, comment #13.
153 export -n DISPLAY
154
155 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
156 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
157 # return _parse_localename(localename)
158 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
159 # raise ValueError, 'unknown locale: %s' % localename
160 #ValueError: unknown locale: 46
161 export -n LANGUAGE
162
163 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
164 # variables to point to our fake temporary $HOME.
165 export HOME="${T}/fake_homedir"
166 export XDG_CONFIG_HOME="${HOME}/.config"
167 export XDG_DATA_HOME="${HOME}/.local/share"
168 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
169 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
170
171 # Bug #334243 - respect LDFLAGS when building calibre-mount-helper
172 export OVERRIDE_CFLAGS="$CFLAGS $LDFLAGS"
173 local libdir=$(get_libdir)
174 [[ -n $libdir ]] || die "get_libdir returned an empty string"
175
176 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
177 distutils_src_install \
178 --prefix="${EPREFIX}/usr" \
179 --libdir="${EPREFIX}/usr/${libdir}" \
180 --staging-root="${ED}usr" \
181 --staging-libdir="${ED}usr/${libdir}"
182
183 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
184 die "failed to fix harcoded \$D in paths"
185
186 find "${ED}"usr/share/calibre/man -type f -print0 | \
187 while read -r -d $'\0' ; do
188 if [[ ${REPLY} = *.[0-9]calibre.bz2 ]] ; then
189 newname=${REPLY%calibre.bz2}.bz2
190 mv "${REPLY}" "${newname}"
191 doman "${newname}" || die "doman failed"
192 rm -f "${newname}" || die "rm failed"
193 fi
194 done
195 rmdir "${ED}"usr/share/calibre/man/* || \
196 die "could not remove redundant man subdir(s)"
197 rmdir "${ED}"usr/share/calibre/man || \
198 die "could not remove redundant man dir"
199
200 # The menu entries end up here due to '--mode user' being added to
201 # xdg-* options in src_prepare.
202 dodir /usr/share/mime/packages
203 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
204 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
205 die "failed to register mime types"
206 dodir /usr/share/icons
207 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
208 die "failed to install icon files"
209
210 domenu "${HOME}"/.local/share/applications/*.desktop ||
211 die "failed to install .desktop menu files"
212
213 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre || die
214 rm -r "${ED}"usr/etc/bash_completion.d
215 find "${ED}"usr/etc -type d -empty -delete
216
217 python_convert_shebangs -r $(python_get_version) "${ED}"
218 }
219
220 pkg_postinst() {
221 fdo-mime_desktop_database_update
222 fdo-mime_mime_database_update
223 python_mod_optimize /usr/$(get_libdir)/${PN}
224 }
225
226 pkg_postrm() {
227 python_mod_cleanup /usr/$(get_libdir)/${PN}
228 }