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