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.67.ebuild ChangeLog calibre-0.8.65.ebuild
Date: Fri, 31 Aug 2012 17:12:29
Message-Id: 20120831171217.BD38D20DC0@flycatcher.gentoo.org
1 zmedico 12/08/31 17:12:17
2
3 Modified: ChangeLog
4 Added: calibre-0.8.67.ebuild
5 Removed: calibre-0.8.65.ebuild
6 Log:
7 0.8.67 version bump.
8
9 (Portage version: 2.2.0_alpha123/cvs/Linux i686)
10
11 Revision Changes Path
12 1.224 app-text/calibre/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.224&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.224&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.223&r2=1.224
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
21 retrieving revision 1.223
22 retrieving revision 1.224
23 diff -u -r1.223 -r1.224
24 --- ChangeLog 24 Aug 2012 20:28:26 -0000 1.223
25 +++ ChangeLog 31 Aug 2012 17:12:17 -0000 1.224
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.223 2012/08/24 20:28:26 zmedico Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.224 2012/08/31 17:12:17 zmedico Exp $
31 +
32 +*calibre-0.8.67 (31 Aug 2012)
33 +
34 + 31 Aug 2012; Zac Medico <zmedico@g.o> +calibre-0.8.67.ebuild,
35 + -calibre-0.8.65.ebuild:
36 + 0.8.67 version bump.
37
38 *calibre-0.8.66 (24 Aug 2012)
39
40
41
42
43 1.1 app-text/calibre/calibre-0.8.67.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.67.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.67.ebuild?rev=1.1&content-type=text/plain
47
48 Index: calibre-0.8.67.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.67.ebuild,v 1.1 2012/08/31 17:12:17 zmedico Exp $
53
54 EAPI=4
55 PYTHON_DEPEND=2:2.7
56 PYTHON_USE_WITH="ssl sqlite"
57
58 inherit python 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/netifaces
79 dev-python/python-dateutil
80 >=dev-python/dnspython-1.6.0
81 >=dev-python/cssutils-0.9.9
82 >=dev-python/dbus-python-0.82.2
83 >=dev-python/imaging-1.1.6
84 >=dev-python/lxml-2.2.1
85 >=dev-python/mechanize-0.1.11
86 >=dev-python/python-dateutil-1.4.1
87 >=dev-python/PyQt4-4.9.1[X,svg,webkit]
88 >=media-gfx/imagemagick-6.5.9[jpeg,png]
89 >=media-libs/libwmf-0.2.8
90 media-libs/libmtp
91 virtual/libusb:0
92 x11-libs/qt-dbus:4
93 x11-libs/qt-svg:4
94 >=x11-misc/xdg-utils-1.0.2-r2"
95
96 RDEPEND="${COMMON_DEPEND}
97 udisks? ( sys-fs/udisks:0 )"
98
99 DEPEND="${COMMON_DEPEND}
100 >=dev-python/setuptools-0.6_rc5"
101
102 S=${WORKDIR}/${PN}
103
104 pkg_setup() {
105 python_set_active_version 2.7
106 python_pkg_setup
107 }
108
109 src_prepare() {
110 # Fix outdated version constant.
111 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
112 # -i src/calibre/constants.py || \
113 # die "sed failed to patch constants.py"
114
115 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
116 # calls xdg-* (bug #258938).
117 sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
118 -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
119 -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
120 -e "s|PreserveMIMEDefaults():||" \
121 -e "s|xdg-icon-resource install|\\0 --mode user|" \
122 -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
123 -e "s|xdg-mime install|\\0 --mode user|" \
124 -i src/calibre/linux.py || die "sed failed to patch linux.py"
125
126 # Disable unnecessary privilege dropping for bug #287067.
127 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
128 -i setup/install.py || die "sed failed to patch install.py"
129
130 sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
131 \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
132 '-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
133 '-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
134 '-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
135 '-i', 'Makefile'])" \
136 -i setup/extensions.py || die "sed failed to patch extensions.py"
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" OVERRIDE_LDFLAGS="$LDFLAGS"
173 local libdir=$(get_libdir)
174 [[ -n $libdir ]] || die "get_libdir returned an empty string"
175
176 dodir "$(python_get_sitedir)" # for init_calibre.py
177 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
178 python setup.py install \
179 --root="${D}" \
180 --prefix="${EPREFIX}/usr" \
181 --libdir="${EPREFIX}/usr/${libdir}" \
182 --staging-root="${ED}usr" \
183 --staging-libdir="${ED}usr/${libdir}" || die
184
185 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
186 die "failed to fix harcoded \$D in paths"
187
188 # Remove dummy calibre-mount-helper which is unused since calibre-0.8.25
189 # due to bug #389515 (instead, calibre now calls udisks via dbus).
190 rm "${ED}usr/bin/calibre-mount-helper" || die
191
192 # The menu entries end up here due to '--mode user' being added to
193 # xdg-* options in src_prepare.
194 dodir /usr/share/mime/packages
195 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
196 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
197 die "failed to register mime types"
198 dodir /usr/share/icons
199 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
200 die "failed to install icon files"
201
202 domenu "${HOME}"/.local/share/applications/*.desktop ||
203 die "failed to install .desktop menu files"
204
205 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre
206 rm -r "${ED}"usr/etc/bash_completion.d
207 find "${ED}"usr/etc -type d -empty -delete
208
209 python_convert_shebangs -r $(python_get_version) "${ED}"
210
211 newinitd "${FILESDIR}"/calibre-server.init calibre-server
212 newconfd "${FILESDIR}"/calibre-server.conf calibre-server
213 }
214
215 pkg_postinst() {
216 fdo-mime_desktop_database_update
217 fdo-mime_mime_database_update
218 python_mod_optimize /usr/$(get_libdir)/${PN}
219 }
220
221 pkg_postrm() {
222 python_mod_cleanup /usr/$(get_libdir)/${PN}
223 }