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.8.54.ebuild ChangeLog
Date: Thu, 31 May 2012 21:59:34
Message-Id: 20120531215919.8CA1B20047@flycatcher.gentoo.org
1 zmedico 12/05/31 21:59:19
2
3 Modified: ChangeLog
4 Added: calibre-0.8.54.ebuild
5 Log:
6 0.8.54 version bump.
7
8 (Portage version: 2.2.0_alpha108_p8/cvs/Linux i686)
9
10 Revision Changes Path
11 1.208 app-text/calibre/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.208&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.208&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.207&r2=1.208
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
20 retrieving revision 1.207
21 retrieving revision 1.208
22 diff -u -r1.207 -r1.208
23 --- ChangeLog 29 May 2012 11:25:10 -0000 1.207
24 +++ ChangeLog 31 May 2012 21:59:19 -0000 1.208
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-text/calibre
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.207 2012/05/29 11:25:10 scarabeus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.208 2012/05/31 21:59:19 zmedico Exp $
30 +
31 +*calibre-0.8.54 (31 May 2012)
32 +
33 + 31 May 2012; Zac Medico <zmedico@g.o> +calibre-0.8.54.ebuild:
34 + 0.8.54 version bump.
35
36 29 May 2012; Tomáš Chvátal <scarabeus@g.o> -calibre-0.8.48.ebuild,
37 calibre-0.8.52.ebuild:
38
39
40
41 1.1 app-text/calibre/calibre-0.8.54.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.54.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-0.8.54.ebuild?rev=1.1&content-type=text/plain
45
46 Index: calibre-0.8.54.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.8.54.ebuild,v 1.1 2012/05/31 21:59:19 zmedico Exp $
51
52 EAPI=4
53 PYTHON_DEPEND=2:2.7
54 PYTHON_USE_WITH="ssl sqlite"
55
56 inherit python distutils eutils fdo-mime bash-completion-r1 multilib
57
58 DESCRIPTION="Ebook management application."
59 HOMEPAGE="http://calibre-ebook.com/"
60 SRC_URI="http://sourceforge.net/projects/calibre/files/${PV}/${P}.tar.xz"
61
62 LICENSE="GPL-2"
63
64 KEYWORDS="~amd64 ~x86"
65
66 SLOT="0"
67
68 IUSE="+udisks"
69
70 COMMON_DEPEND="
71 >=app-text/podofo-0.8.2
72 >=app-text/poppler-0.12.3-r3[qt4,xpdf-headers]
73 >=dev-libs/chmlib-0.40
74 >=dev-libs/icu-4.4
75 >=dev-python/beautifulsoup-3.0.5:python-2
76 dev-python/python-dateutil
77 >=dev-python/dnspython-1.6.0
78 >=dev-python/cssutils-0.9.9
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.9.1[X,svg,webkit]
85 >=media-gfx/imagemagick-6.5.9[jpeg,png]
86 >=media-libs/libwmf-0.2.8
87 virtual/libusb:0
88 >=x11-misc/xdg-utils-1.0.2-r2"
89
90 RDEPEND="${COMMON_DEPEND}
91 udisks? ( sys-fs/udisks:0 )"
92
93 DEPEND="${COMMON_DEPEND}
94 >=dev-python/setuptools-0.6_rc5"
95
96 S=${WORKDIR}/${PN}
97
98 pkg_setup() {
99 python_set_active_version 2.7
100 python_pkg_setup
101 }
102
103 src_prepare() {
104 # Fix outdated version constant.
105 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
106 # -i src/calibre/constants.py || \
107 # die "sed failed to patch constants.py"
108
109 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
110 # calls xdg-* (bug #258938).
111 sed -e "s:'xdg-desktop-menu', 'install':\\0, '--mode', 'user':" \
112 -e "s:check_call(\\['xdg-desktop-menu', 'forceupdate'\\]):#\\0:" \
113 -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
114 -e "s|PreserveMIMEDefaults():||" \
115 -e "s:xdg-icon-resource install:\\0 --mode user:" \
116 -e "s:xdg-mime install:\\0 --mode user:" \
117 -i src/calibre/linux.py || die "sed failed to patch linux.py"
118
119 # Disable unnecessary privilege dropping for bug #287067.
120 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
121 -i setup/install.py || die "sed failed to patch install.py"
122
123 sed -e "/^ self\\.check_call(qmc + \\[ext\\.name+'\\.pro'\\])$/a\
124 \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
125 '-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
126 '-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
127 '-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
128 '-i', 'Makefile'])" \
129 -i setup/extensions.py || die "sed failed to patch extensions.py"
130
131 distutils_src_prepare
132 }
133
134 src_install() {
135
136 # Bypass kbuildsycoca and update-mime-database in order to
137 # avoid sandbox violations if xdg-mime tries to call them.
138 cat - > "${T}/kbuildsycoca" <<-EOF
139 #!${BASH}
140 exit 0
141 EOF
142
143 cp "${T}"/{kbuildsycoca,update-mime-database}
144 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
145
146 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
147 # violation with kbuildsycoca as in bug #287067, comment #13.
148 export -n DISPLAY
149
150 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
151 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
152 # return _parse_localename(localename)
153 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
154 # raise ValueError, 'unknown locale: %s' % localename
155 #ValueError: unknown locale: 46
156 export -n LANGUAGE
157
158 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
159 # variables to point to our fake temporary $HOME.
160 export HOME="${T}/fake_homedir"
161 export XDG_CONFIG_HOME="${HOME}/.config"
162 export XDG_DATA_HOME="${HOME}/.local/share"
163 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
164 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
165
166 # Bug #334243 - respect LDFLAGS when building calibre-mount-helper
167 export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
168 local libdir=$(get_libdir)
169 [[ -n $libdir ]] || die "get_libdir returned an empty string"
170
171 dodir "$(python_get_sitedir)" # for init_calibre.py
172 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
173 distutils_src_install \
174 --prefix="${EPREFIX}/usr" \
175 --libdir="${EPREFIX}/usr/${libdir}" \
176 --staging-root="${ED}usr" \
177 --staging-libdir="${ED}usr/${libdir}"
178
179 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
180 die "failed to fix harcoded \$D in paths"
181
182 # Remove dummy calibre-mount-helper which is unused since calibre-0.8.25
183 # due to bug #389515 (instead, calibre now calls udisks via dbus).
184 rm "${ED}usr/bin/calibre-mount-helper" || die
185
186 # The menu entries end up here due to '--mode user' being added to
187 # xdg-* options in src_prepare.
188 dodir /usr/share/mime/packages
189 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
190 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
191 die "failed to register mime types"
192 dodir /usr/share/icons
193 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
194 die "failed to install icon files"
195
196 domenu "${HOME}"/.local/share/applications/*.desktop ||
197 die "failed to install .desktop menu files"
198
199 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre
200 rm -r "${ED}"usr/etc/bash_completion.d
201 find "${ED}"usr/etc -type d -empty -delete
202
203 python_convert_shebangs -r $(python_get_version) "${ED}"
204
205 newinitd "${FILESDIR}"/calibre-server.init calibre-server
206 newconfd "${FILESDIR}"/calibre-server.conf calibre-server
207 }
208
209 pkg_postinst() {
210 fdo-mime_desktop_database_update
211 fdo-mime_mime_database_update
212 python_mod_optimize /usr/$(get_libdir)/${PN}
213 }
214
215 pkg_postrm() {
216 python_mod_cleanup /usr/$(get_libdir)/${PN}
217 }