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