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.9.5.ebuild ChangeLog calibre-0.9.3.ebuild
Date: Fri, 02 Nov 2012 07:22:18
Message-Id: 20121102072200.0E59721600@flycatcher.gentoo.org
1 zmedico 12/11/02 07:21:59
2
3 Modified: ChangeLog
4 Added: calibre-0.9.5.ebuild
5 Removed: calibre-0.9.3.ebuild
6 Log:
7 0.9.5 version bump.
8
9 (Portage version: 2.2.0_alpha142_p3/cvs/Linux i686, RepoMan options: --force, signed Manifest commit with key 0xFDE8EF85AE5719A3)
10
11 Revision Changes Path
12 1.240 app-text/calibre/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.240&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.240&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.239&r2=1.240
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
21 retrieving revision 1.239
22 retrieving revision 1.240
23 diff -u -r1.239 -r1.240
24 --- ChangeLog 26 Oct 2012 08:41:23 -0000 1.239
25 +++ ChangeLog 2 Nov 2012 07:21:59 -0000 1.240
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.239 2012/10/26 08:41:23 zmedico Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.240 2012/11/02 07:21:59 zmedico Exp $
31 +
32 +*calibre-0.9.5 (02 Nov 2012)
33 +
34 + 02 Nov 2012; Zac Medico <zmedico@g.o> +calibre-0.9.5.ebuild,
35 + -calibre-0.9.3.ebuild:
36 + 0.9.5 version bump.
37
38 *calibre-0.9.4 (26 Oct 2012)
39
40
41
42
43 1.1 app-text/calibre/calibre-0.9.5.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.9.5.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.9.5.ebuild?rev=1.1&content-type=text/plain
47
48 Index: calibre-0.9.5.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.9.5.ebuild,v 1.1 2012/11/02 07:21:59 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/cssselect-0.7.1
82 >=dev-python/cssutils-0.9.9
83 >=dev-python/dbus-python-0.82.2
84 >=dev-python/imaging-1.1.6
85 >=dev-python/lxml-2.2.1
86 >=dev-python/mechanize-0.1.11
87 >=dev-python/python-dateutil-1.4.1
88 >=dev-python/PyQt4-4.9.1[X,svg,webkit]
89 media-fonts/liberation-fonts
90 >=media-gfx/imagemagick-6.5.9[jpeg,png]
91 >=media-libs/freetype-2
92 >=media-libs/libwmf-0.2.8
93 >=media-libs/libmtp-1.1.4
94 virtual/libusb:1
95 x11-libs/qt-dbus:4
96 x11-libs/qt-svg:4
97 >=x11-misc/xdg-utils-1.0.2-r2"
98
99 RDEPEND="${COMMON_DEPEND}
100 udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
101
102 DEPEND="${COMMON_DEPEND}
103 >=dev-python/setuptools-0.6_rc5"
104
105 S=${WORKDIR}/${PN}
106
107 pkg_setup() {
108 python_set_active_version 2.7
109 python_pkg_setup
110 }
111
112 src_prepare() {
113 # Fix outdated version constant.
114 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
115 # -i src/calibre/constants.py || \
116 # die "sed failed to patch constants.py"
117
118 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
119 # calls xdg-* (bug #258938).
120 sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
121 -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
122 -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
123 -e "s|PreserveMIMEDefaults():||" \
124 -e "s|xdg-icon-resource install|\\0 --mode user|" \
125 -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
126 -e "s|xdg-mime install|\\0 --mode user|" \
127 -i src/calibre/linux.py || die "sed failed to patch linux.py"
128
129 # Disable unnecessary privilege dropping for bug #287067.
130 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
131 -i setup/install.py || die "sed failed to patch install.py"
132
133 sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
134 \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
135 '-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
136 '-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
137 '-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
138 '-i', 'Makefile'])" \
139 -i setup/extensions.py || die "sed failed to patch extensions.py"
140 }
141
142 src_install() {
143
144 # Bypass kbuildsycoca and update-mime-database in order to
145 # avoid sandbox violations if xdg-mime tries to call them.
146 cat - > "${T}/kbuildsycoca" <<-EOF
147 #!${BASH}
148 exit 0
149 EOF
150
151 cp "${T}"/{kbuildsycoca,update-mime-database}
152 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
153
154 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
155 # violation with kbuildsycoca as in bug #287067, comment #13.
156 export -n DISPLAY
157
158 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
159 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
160 # return _parse_localename(localename)
161 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
162 # raise ValueError, 'unknown locale: %s' % localename
163 #ValueError: unknown locale: 46
164 export -n LANGUAGE
165
166 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
167 # variables to point to our fake temporary $HOME.
168 export HOME="${T}/fake_homedir"
169 export XDG_CONFIG_HOME="${HOME}/.config"
170 export XDG_DATA_HOME="${HOME}/.local/share"
171 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
172 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
173
174 # Bug #334243 - respect LDFLAGS when building calibre-mount-helper
175 export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
176 local libdir=$(get_libdir)
177 [[ -n $libdir ]] || die "get_libdir returned an empty string"
178
179 dodir "$(python_get_sitedir)" # for init_calibre.py
180 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
181 python setup.py install \
182 --root="${D}" \
183 --prefix="${EPREFIX}/usr" \
184 --libdir="${EPREFIX}/usr/${libdir}" \
185 --staging-root="${ED}usr" \
186 --staging-libdir="${ED}usr/${libdir}" || die
187
188 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
189 die "failed to fix harcoded \$D in paths"
190
191 # Remove dummy calibre-mount-helper which is unused since calibre-0.8.25
192 # due to bug #389515 (instead, calibre now calls udisks via dbus).
193 rm "${ED}usr/bin/calibre-mount-helper" || die
194
195 # The menu entries end up here due to '--mode user' being added to
196 # xdg-* options in src_prepare.
197 dodir /usr/share/mime/packages
198 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
199 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
200 die "failed to register mime types"
201 dodir /usr/share/icons
202 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
203 die "failed to install icon files"
204
205 domenu "${HOME}"/.local/share/applications/*.desktop ||
206 die "failed to install .desktop menu files"
207
208 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre
209 rm -r "${ED}"usr/etc/bash_completion.d
210 find "${ED}"usr/etc -type d -empty -delete
211
212 cd "${ED}"/usr/share/calibre/fonts/liberation || die
213 local x
214 for x in * ; do
215 [[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
216 ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
217 done
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 }