Gentoo Archives: gentoo-commits

From: "Ben de Groot (yngwin)" <yngwin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/calibre: calibre-1.34.ebuild ChangeLog calibre-1.33.ebuild
Date: Thu, 01 May 2014 02:22:04
Message-Id: 20140501022200.65C0F2004C@flycatcher.gentoo.org
1 yngwin 14/05/01 02:22:00
2
3 Modified: ChangeLog
4 Added: calibre-1.34.ebuild
5 Removed: calibre-1.33.ebuild
6 Log:
7 version bump; update dependencies (bug #508280)
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x0F9C590B7FF324F6!)
10
11 Revision Changes Path
12 1.316 app-text/calibre/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.316&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.316&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.315&r2=1.316
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
21 retrieving revision 1.315
22 retrieving revision 1.316
23 diff -u -r1.315 -r1.316
24 --- ChangeLog 25 Apr 2014 16:55:32 -0000 1.315
25 +++ ChangeLog 1 May 2014 02:22:00 -0000 1.316
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-text/calibre
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.315 2014/04/25 16:55:32 axs Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.316 2014/05/01 02:22:00 yngwin Exp $
31 +
32 +*calibre-1.34 (01 May 2014)
33 +
34 + 01 May 2014; Ben de Groot <yngwin@g.o> +calibre-1.34.ebuild,
35 + -calibre-1.33.ebuild:
36 + version bump; update dependencies (bug #508280)
37
38 25 Apr 2014; Ian Stakenvicius (_AxS_) <axs@g.o> metadata.xml:
39 added self to maintainers list
40
41
42
43 1.1 app-text/calibre/calibre-1.34.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-1.34.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-1.34.ebuild?rev=1.1&content-type=text/plain
47
48 Index: calibre-1.34.ebuild
49 ===================================================================
50 # Copyright 1999-2014 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-1.34.ebuild,v 1.1 2014/05/01 02:22:00 yngwin Exp $
53
54 EAPI=5
55
56 inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
57
58 DESCRIPTION="Ebook management application"
59 HOMEPAGE="http://calibre-ebook.com/"
60 [[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
61 SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
62
63 LICENSE="
64 GPL-3+
65 GPL-3
66 GPL-2+
67 GPL-2
68 GPL-1+
69 LGPL-3+
70 LGPL-2.1+
71 LGPL-2.1
72 BSD
73 MIT
74 Old-MIT
75 Apache-2.0
76 public-domain
77 || ( Artistic GPL-1+ )
78 CC-BY-3.0
79 OFL-1.1
80 PSF-2
81 unRAR
82 "
83
84 KEYWORDS="~amd64 ~x86"
85 SLOT="0"
86 IUSE="+udisks"
87
88 COMMON_DEPEND="
89 >=app-text/podofo-0.8.2:=
90 >=app-text/poppler-0.20.2:=[qt4,xpdf-headers(+)]
91 >=dev-lang/python-2.7.1:2.7[sqlite,ssl]
92 >=dev-libs/chmlib-0.40:=
93 >=dev-libs/icu-4.4:=
94 >=dev-python/apsw-3.7.17
95 >=dev-python/beautifulsoup-3.0.5:python-2
96 dev-python/netifaces
97 dev-python/python-dateutil
98 >=dev-python/dnspython-1.6.0
99 >=dev-python/cssselect-0.7.1
100 >=dev-python/cssutils-0.9.9
101 >=dev-python/dbus-python-0.82.2
102 >=dev-python/lxml-3.2.1
103 >=dev-python/mechanize-0.1.11
104 >=dev-python/python-dateutil-1.4.1
105 >=dev-python/PyQt4-4.9.6[X,svg,webkit]
106 dev-qt/qtdbus:4=
107 dev-qt/qtsvg:4=
108 media-fonts/liberation-fonts
109 >=media-gfx/imagemagick-6.5.9[jpeg,png]
110 >=media-libs/freetype-2:=
111 >=media-libs/libwmf-0.2.8
112 >=media-libs/libmtp-1.1.5:=
113 virtual/libusb:1=
114 virtual/python-imaging
115 >=x11-misc/xdg-utils-1.0.2-r2"
116
117 RDEPEND="${COMMON_DEPEND}
118 udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
119
120 DEPEND="${COMMON_DEPEND}
121 >=dev-python/setuptools-0.6_rc5"
122
123 S=${WORKDIR}/${PN}
124
125 src_prepare() {
126 # Fix outdated version constant.
127 #sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
128 # -i src/calibre/constants.py || \
129 # die "sed failed to patch constants.py"
130
131 # Avoid sandbox violation in /usr/share/gnome/apps when linux.py
132 # calls xdg-* (bug #258938).
133 sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
134 -e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
135 -e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
136 -e "s|PreserveMIMEDefaults():||" \
137 -e "s|xdg-icon-resource install|\\0 --mode user|" \
138 -e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
139 -e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
140 -i src/calibre/linux.py || die "sed failed to patch linux.py"
141
142 # Disable unnecessary privilege dropping for bug #287067.
143 sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
144 -i setup/install.py || die "sed failed to patch install.py"
145
146 sed -e "/^ self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
147 \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
148 '-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
149 '-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
150 '-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
151 '-i', 'Makefile'])" \
152 -i setup/extensions.py || die "sed failed to patch extensions.py"
153
154 # no_updates: do not annoy user with "new version is availible all the time
155 # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
156 epatch \
157 "${FILESDIR}/${PN}-1.20-no_updates_dialog.patch" \
158 "${FILESDIR}/${PN}-disable_plugins.patch"
159 }
160
161 src_install() {
162 # Bypass kbuildsycoca and update-mime-database in order to
163 # avoid sandbox violations if xdg-mime tries to call them.
164 cat - > "${T}/kbuildsycoca" <<-EOF
165 #!${BASH}
166 exit 0
167 EOF
168
169 cp "${T}"/{kbuildsycoca,update-mime-database}
170 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
171
172 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
173 # violation with kbuildsycoca as in bug #287067, comment #13.
174 export -n DISPLAY
175
176 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
177 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
178 # return _parse_localename(localename)
179 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
180 # raise ValueError, 'unknown locale: %s' % localename
181 #ValueError: unknown locale: 46
182 export -n LANGUAGE
183
184 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
185 # variables to point to our fake temporary $HOME.
186 export HOME="${T}/fake_homedir"
187 export XDG_CONFIG_HOME="${HOME}/.config"
188 export XDG_DATA_HOME="${HOME}/.local/share"
189 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
190 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
191
192 tc-export CC CXX
193 # Bug #334243 - respect LDFLAGS when building extensions
194 export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
195 local libdir=$(get_libdir)
196 [[ -n $libdir ]] || die "get_libdir returned an empty string"
197
198 # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
199 local x
200 for x in /dev/dri/card[0-9] ; do
201 [[ -e ${x} ]] && addpredict ${x}
202 done
203
204 dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
205 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
206 "${EPREFIX}"/usr/bin/python2.7 setup.py install \
207 --root="${D}" \
208 --prefix="${EPREFIX}/usr" \
209 --libdir="${EPREFIX}/usr/${libdir}" \
210 --staging-root="${ED}usr" \
211 --staging-libdir="${ED}usr/${libdir}" || die
212
213 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
214 die "failed to fix harcoded \$D in paths"
215
216 # The menu entries end up here due to '--mode user' being added to
217 # xdg-* options in src_prepare.
218 dodir /usr/share/mime/packages
219 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
220 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
221 die "failed to register mime types"
222 dodir /usr/share/icons
223 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
224 die "failed to install icon files"
225
226 domenu "${HOME}"/.local/share/applications/*.desktop ||
227 die "failed to install .desktop menu files"
228
229 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre
230 rm -r "${ED}"usr/etc/bash_completion.d
231 find "${ED}"usr/etc -type d -empty -delete
232
233 cd "${ED}"/usr/share/calibre/fonts/liberation || die
234 local x
235 for x in * ; do
236 [[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
237 ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
238 done
239
240 einfo "Converting python shebangs"
241 while read -r -d $'\0' ; do
242 local shebang=$(head -n1 "$REPLY")
243 if [[ ${shebang} == "#!"*python* ]] ; then
244 sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
245 die "sed failed"
246 fi
247 done < <(find "${ED}" -type f -print0)
248
249 einfo "Compiling python modules"
250 "${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
251 -d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
252
253 newinitd "${FILESDIR}"/calibre-server.init calibre-server
254 newconfd "${FILESDIR}"/calibre-server.conf calibre-server
255 }
256
257 pkg_postinst() {
258 fdo-mime_desktop_database_update
259 fdo-mime_mime_database_update
260 }