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