Gentoo Archives: gentoo-commits

From: "Ian Stakenvicius (axs)" <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/calibre: calibre-1.43.ebuild ChangeLog calibre-1.39.ebuild calibre-1.38.ebuild calibre-1.40.ebuild
Date: Tue, 08 Jul 2014 14:29:28
Message-Id: 20140708142924.F246A2004E@flycatcher.gentoo.org
1 axs 14/07/08 14:29:24
2
3 Modified: ChangeLog
4 Added: calibre-1.43.ebuild
5 Removed: calibre-1.39.ebuild calibre-1.38.ebuild
6 calibre-1.40.ebuild
7 Log:
8 version bump, remove old
9
10 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 2B6559ED)
11
12 Revision Changes Path
13 1.326 app-text/calibre/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.326&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?rev=1.326&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/ChangeLog?r1=1.325&r2=1.326
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v
22 retrieving revision 1.325
23 retrieving revision 1.326
24 diff -u -r1.325 -r1.326
25 --- ChangeLog 14 Jun 2014 07:01:17 -0000 1.325
26 +++ ChangeLog 8 Jul 2014 14:29:24 -0000 1.326
27 @@ -1,6 +1,12 @@
28 # ChangeLog for app-text/calibre
29 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.325 2014/06/14 07:01:17 zmedico Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.326 2014/07/08 14:29:24 axs Exp $
32 +
33 +*calibre-1.43 (08 Jul 2014)
34 +
35 + 08 Jul 2014; Ian Stakenvicius (_AxS_) <axs@g.o> +calibre-1.43.ebuild,
36 + -calibre-1.38.ebuild, -calibre-1.39.ebuild, -calibre-1.40.ebuild:
37 + version bump, remove old
38
39 14 Jun 2014; Zac Medico <zmedico@g.o> calibre-1.2.ebuild,
40 calibre-1.20.ebuild, calibre-1.25.ebuild, calibre-1.29.ebuild,
41
42
43
44 1.1 app-text/calibre/calibre-1.43.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-1.43.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/calibre/calibre-1.43.ebuild?rev=1.1&content-type=text/plain
48
49 Index: calibre-1.43.ebuild
50 ===================================================================
51 # Copyright 1999-2014 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-1.43.ebuild,v 1.1 2014/07/08 14:29:24 axs Exp $
54
55 EAPI=5
56
57 inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
58
59 DESCRIPTION="Ebook management application"
60 HOMEPAGE="http://calibre-ebook.com/"
61 [[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
62 SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
63
64 LICENSE="
65 GPL-3+
66 GPL-3
67 GPL-2+
68 GPL-2
69 GPL-1+
70 LGPL-3+
71 LGPL-2.1+
72 LGPL-2.1
73 BSD
74 MIT
75 Old-MIT
76 Apache-2.0
77 public-domain
78 || ( Artistic GPL-1+ )
79 CC-BY-3.0
80 OFL-1.1
81 PSF-2
82 unRAR
83 "
84
85 KEYWORDS="~amd64 ~arm ~x86"
86 SLOT="0"
87 IUSE="+udisks"
88
89 COMMON_DEPEND="
90 >=app-text/podofo-0.8.2:=
91 >=app-text/poppler-0.20.2:=[qt4,xpdf-headers(+)]
92 >=dev-lang/python-2.7.1:2.7[sqlite,ssl]
93 >=dev-libs/chmlib-0.40:=
94 >=dev-libs/icu-4.4:=
95 >=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
96 >=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
97 dev-python/netifaces[python_targets_python2_7(-)]
98 >=dev-python/dnspython-1.6.0[python_targets_python2_7(-)]
99 >=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
100 >=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
101 >=dev-python/dbus-python-0.82.2[python_targets_python2_7(-)]
102 >=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
103 >=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
104 >=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
105 >=dev-python/PyQt4-4.9.6[X,svg,webkit,python_targets_python2_7(-)]
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[python_targets_python2_7(-)]
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 # use system beautifulsoup, instead of bundled
155 rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py || die "could not remove bundled beautifulsoup"
156 find "${S}" -type f -name \*.py -exec \
157 sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
158 || die "could not sed bundled beautifulsoup out of the source tree"
159
160 # no_updates: do not annoy user with "new version is availible all the time
161 # disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
162 # C locale: if LC_ALL=C do not raise an exception when locale cannot be canonicalized
163 epatch \
164 "${FILESDIR}/${PN}-1.34-no_updates_dialog.patch" \
165 "${FILESDIR}/${PN}-disable_plugins.patch"
166 }
167
168 src_install() {
169 # Bypass kbuildsycoca and update-mime-database in order to
170 # avoid sandbox violations if xdg-mime tries to call them.
171 cat - > "${T}/kbuildsycoca" <<-EOF
172 #!${BASH}
173 exit 0
174 EOF
175
176 cp "${T}"/{kbuildsycoca,update-mime-database}
177 chmod +x "${T}"/{kbuildsycoca,update-mime-database}
178
179 # Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
180 # violation with kbuildsycoca as in bug #287067, comment #13.
181 export -n DISPLAY
182
183 # Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
184 # File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
185 # return _parse_localename(localename)
186 # File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
187 # raise ValueError, 'unknown locale: %s' % localename
188 #ValueError: unknown locale: 46
189 export -n LANGUAGE
190
191 # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
192 # variables to point to our fake temporary $HOME.
193 export HOME="${T}/fake_homedir"
194 export XDG_CONFIG_HOME="${HOME}/.config"
195 export XDG_DATA_HOME="${HOME}/.local/share"
196 export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
197 mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
198
199 tc-export CC CXX
200 # Bug #334243 - respect LDFLAGS when building extensions
201 export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
202 local libdir=$(get_libdir)
203 [[ -n $libdir ]] || die "get_libdir returned an empty string"
204
205 # Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
206 local x
207 for x in /dev/dri/card[0-9] ; do
208 [[ -e ${x} ]] && addpredict ${x}
209 done
210
211 dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
212 PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
213 "${EPREFIX}"/usr/bin/python2.7 setup.py install \
214 --root="${D}" \
215 --prefix="${EPREFIX}/usr" \
216 --libdir="${EPREFIX}/usr/${libdir}" \
217 --staging-root="${ED}usr" \
218 --staging-libdir="${ED}usr/${libdir}" || die
219
220 grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
221 die "failed to fix harcoded \$D in paths"
222
223 # The menu entries end up here due to '--mode user' being added to
224 # xdg-* options in src_prepare.
225 dodir /usr/share/mime/packages
226 chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
227 mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
228 die "failed to register mime types"
229 dodir /usr/share/icons
230 mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
231 die "failed to install icon files"
232
233 domenu "${HOME}"/.local/share/applications/*.desktop ||
234 die "failed to install .desktop menu files"
235
236 dobashcomp "${ED}"usr/etc/bash_completion.d/calibre
237 rm -r "${ED}"usr/etc/bash_completion.d
238 find "${ED}"usr/etc -type d -empty -delete
239
240 cd "${ED}"/usr/share/calibre/fonts/liberation || die
241 local x
242 for x in * ; do
243 [[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
244 ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
245 done
246
247 einfo "Converting python shebangs"
248 while read -r -d $'\0' ; do
249 local shebang=$(head -n1 "$REPLY")
250 if [[ ${shebang} == "#!"*python* ]] ; then
251 sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
252 die "sed failed"
253 fi
254 done < <(find "${ED}" -type f -print0)
255
256 einfo "Compiling python modules"
257 "${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
258 -d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
259
260 newinitd "${FILESDIR}"/calibre-server.init calibre-server
261 newconfd "${FILESDIR}"/calibre-server.conf calibre-server
262 }
263
264 pkg_postinst() {
265 fdo-mime_desktop_database_update
266 fdo-mime_mime_database_update
267 }