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