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.17.ebuild
Date: Tue, 07 Sep 2010 01:27:01
Message-Id: 20100907012654.C97FE20051@flycatcher.gentoo.org
1 zmedico 10/09/07 01:26:54
2
3 Modified: ChangeLog
4 Added: calibre-0.7.17.ebuild
5 Log:
6 0.7.17 version bump. This should also fix bug #336287 (sandbox violation from xdg-icon-resource in XDG_DATA_HOME).
7
8 (Portage version: 2.2_rc76_p2/cvs/Linux i686)
9
10 Revision Changes Path
11 1.100 app-text/calibre/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.100&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.100&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.99&r2=1.100
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
20 retrieving revision 1.99
21 retrieving revision 1.100
22 diff -u -r1.99 -r1.100
23 --- ChangeLog 30 Aug 2010 01:37:34 -0000 1.99
24 +++ ChangeLog 7 Sep 2010 01:26:54 -0000 1.100
25 @@ -1,6 +1,12 @@
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.99 2010/08/30 01:37:34 zmedico Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.100 2010/09/07 01:26:54 zmedico Exp $
30 +
31 +*calibre-0.7.17 (07 Sep 2010)
32 +
33 + 07 Sep 2010; Zac Medico <zmedico@g.o> +calibre-0.7.17.ebuild:
34 + 0.7.17 version bump. This should also fix bug #336287 (sandbox violation
35 + from xdg-icon-resource in XDG_DATA_HOME).
36
37 30 Aug 2010; Zac Medico <zmedico@g.o> -calibre-0.7.2.ebuild,
38 -calibre-0.7.3.ebuild, -calibre-0.7.4.ebuild, -calibre-0.7.5.ebuild,
39
40
41
42 1.1 app-text/calibre/calibre-0.7.17.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.7.17.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.7.17.ebuild?rev=1.1&content-type=text/plain
46
47 Index: calibre-0.7.17.ebuild
48 ===================================================================
49 # Copyright 1999-2010 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.17.ebuild,v 1.1 2010/09/07 01:26:54 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
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.7
73 >=app-text/poppler-0.12.3-r3[qt4,xpdf-headers]
74 >=dev-libs/chmlib-0.40
75 >=dev-python/beautifulsoup-3.0.5
76 >=dev-python/dnspython-1.6.0
77 >=dev-python/cssutils-0.9.7_alpha3
78 >=dev-python/dbus-python-0.82.2
79 >=dev-python/imaging-1.1.6
80 >=dev-python/lxml-2.2.1
81 >=dev-python/mechanize-0.1.11
82 >=dev-python/python-dateutil-1.4.1
83 >=dev-python/PyQt4-4.7[X,svg,webkit]
84 || ( >=media-gfx/imagemagick-6.5.9 media-gfx/graphicsmagick[imagemagick] )
85 >=media-libs/libwmf-0.2.8
86 >=sys-apps/help2man-1.36.4
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 dodir /usr/lib
161 mv "${D}lib/calibre" "${D}usr/lib/" ||
162 die "failed to move lib dir"
163 find "${D}"lib -type d -empty -delete
164
165 dodir /usr/bin
166 mv "${D}bin/"* "${D}usr/bin/" ||
167 die "failed to move bin dir"
168 find "${D}"bin -type d -empty -delete
169
170 dodir /usr/share
171 mv "${D}share/"* "${D}usr/share/" ||
172 die "failed to move share dir"
173 find "${D}"share -type d -empty -delete
174
175 # The menu entries end up here due to '--mode user' being added to
176 # xdg-* options in src_prepare.
177 dodir /usr/share/mime/packages
178 chmod -fR a+rX,u+w,g-w,o-w "$HOME"/.local
179 mv "$HOME"/.local/share/mime/packages/* "$D"usr/share/mime/packages/ ||
180 die "failed to register mime types"
181 dodir /usr/share/icons
182 mv "$HOME"/.local/share/icons/* "$D"usr/share/icons/ ||
183 die "failed to install icon files"
184 domenu "$HOME"/.local/share/applications/*.desktop ||
185 die "failed to install .desktop menu files"
186
187 dobashcompletion "$D"etc/bash_completion.d/calibre
188 rm -r "${D}"etc/bash_completion.d
189 find "${D}"etc -type d -empty -delete
190
191 python_convert_shebangs -r 2 "$D"
192 }
193
194 pkg_postinst() {
195 fdo-mime_desktop_database_update
196 fdo-mime_mime_database_update
197 distutils_pkg_postinst
198 bash-completion_pkg_postinst
199 }