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