public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2015-11-10 13:50 Justin Lecher
  0 siblings, 0 replies; 6+ messages in thread
From: Justin Lecher @ 2015-11-10 13:50 UTC (permalink / raw
  To: gentoo-commits

commit:     8fe384bcef80e8f0e51afb352bdc6ddd6d8fcb1b
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 13:09:42 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 13:50:18 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fe384bc

app-text/calibre: Drop old

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 app-text/calibre/Manifest                          |   6 -
 app-text/calibre/calibre-1.47.ebuild               | 223 ------------------
 app-text/calibre/calibre-1.48-r1.ebuild            | 248 ---------------------
 app-text/calibre/calibre-2.27.0.ebuild             | 229 -------------------
 app-text/calibre/calibre-2.31.0.ebuild             | 229 -------------------
 app-text/calibre/calibre-2.33.0.ebuild             | 228 -------------------
 app-text/calibre/calibre-2.34.0.ebuild             | 228 -------------------
 app-text/calibre/calibre-2.35.0-r1.ebuild          | 228 -------------------
 app-text/calibre/calibre-2.35.0.ebuild             | 231 -------------------
 .../files/calibre-1.34-no_updates_dialog.patch     |  37 ---
 10 files changed, 1887 deletions(-)

diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
index aaa5862..9d612e9 100644
--- a/app-text/calibre/Manifest
+++ b/app-text/calibre/Manifest
@@ -1,8 +1,2 @@
 DIST calibre-1.20.0.tar.xz 32430560 SHA256 475e09b1be4b9977240cbbe6743ab79da4b1f1afe3fe6015d212d868e8f2fac4 SHA512 84ac25080cf4948398b79f9a1af688cca9cf9a5a9200b2aad649f5fda1cd0556be4ade0c8b09ea6ffcc95654eac0aaaa5b8f8ed6ea9830174bc150e64de85e31 WHIRLPOOL 61b6ecde2e3f8679c1afea95dcd152a94ce03522c06dff34b406a5705f6255243f0565fbb5f9bef3ac96d7127190bd1b4363233fa24fafcd0412e061201f6fe8
-DIST calibre-1.47.0.tar.xz 36581960 SHA256 efeb71a5bb4742a9c0a99038fdd97baa55c35e8ba5312e19e422c004bbf5b8c2 SHA512 c6131422891bed0615644336ad1dfc52803ff28d7d33994bea4a34f70655d12ab6b638432156665132805a900324742c41f8d5b7963f24eee4b68359fc433ece WHIRLPOOL dac2b04e195206d7956d7bdb5f45b37cd1e7a873db542d26bd0802d886fb9111aba1e603a795d03a2bf3b55d8cdb92671e11dfdc9fdcdc0707e280a380548f0b
-DIST calibre-1.48.0.tar.xz 35126680 SHA256 e704090f6611c5e374252c3f1b58e077ccd3170a3ea39893e5bf687287abf472 SHA512 0b70f16b10e6c9bbc24955baf74e8fc8e116aaaa1d75d018f5135f657606286de3bfffbebf3b367b2be52708deb05a162de919bba930dcbff59c4ec15c13b28d WHIRLPOOL 1a07a8c916119e92bdf41276db1aef572b704271808bcd6c3a0a4e823c8a76bd2f4267765dee2f378430beec401288b25b35dee6859980adf5b7a9ebe885eff9
-DIST calibre-2.27.0.tar.xz 36776876 SHA256 6567d58a9878f4ad30756c5ce984fe555393fd94167cb23e279c2a83450e2d8e SHA512 0a87549e40f6a3da5489e29fd6969a16ca1e2d8e52ee4d1520ec146b973c3bf4aac73b182b6bb8a0d520137ebe71804543d65ca313ae1560064258c7fa9ff5fa WHIRLPOOL 11f5157c6e1121b68f50f0a923956e6130233aa04790a61ead3dd36ef601cceb15f6d58e5434e0d94cddbbcdc0f9ea84bfb0fa3839752795d8b6271d39679c90
-DIST calibre-2.31.0.tar.xz 37521892 SHA256 7f7e181d3247e41a1122d572a1980fc4ab1926a393aaafe3e26f5345c4602490 SHA512 099450acb2df68800b810ce19d6c8f650b3484d37ebbf30d74f5b26b3724db326d4c4c0d6cc960bd685adfe24e08bc380449b3ee0957275aad76e95fdf60a910 WHIRLPOOL 0673f3caf8c7fd2252d40d2c2a9b5cf886c03afe9a725317031570aaf7f0a8177cb698a34882ba0344de40cdd30826a93f8504d1ef82da88329fee83708b2033
-DIST calibre-2.33.0.tar.xz 37269672 SHA256 0917248454d120f0a3c6c1aec90ad88818ccc1b7747935acce263a272b8b3548 SHA512 1bc63baecd1c1cd3c239b89c102696d39bd7975860bfc3d9fd6cd4bfdbe1e3b81ed6ec40ff3999568d9b0be3fa46efe0490d1c86edf52d67a84fdc7a890e9525 WHIRLPOOL f59ce44f513730675d59fdf42bce4d7c142c39fcd3e148215686604bbf5c9ac18af1dde7f923c25b68edaec6fa3cccce1f4d5066ea7e1c0361491e94e1d6cd93
-DIST calibre-2.34.0.tar.xz 38329660 SHA256 714687deadef951238dc9e7e8f5d67fbb3293522e694aeee3537cbf3a5887012 SHA512 62fbaea1f36a650600cb137acf31c112b374f29dbfc2304365a55971341882eab99f219b3533f4d159957a06d03232cc670868127008ffefd0d40257f636c027 WHIRLPOOL 6bcb92c6616efa3732f5c41b37f9348caba4ae1acef1e0d80cc3b1ceb00f79b68f6fb2fa8dde254020cc28070e3e03828afccd1eead6a785b5717974f5790821
 DIST calibre-2.35.0.tar.xz 37470944 SHA256 7d883c7ed5cf7c3c2e53c4d18e3a67c15d8a0d3425df57919adb57132860518f SHA512 a693c23e93ad1086fe70b0cc7dcf43b1a9c004f045a3c2fac42f6a4b9f231d4f1e7b55c8bae133ac48389d4e233e245deb958365e9c0283cd8668f0f5a2326a2 WHIRLPOOL b07308d7bb9803a3a882aaf4143d287352aafae69383276d6ee95f7b92a8f65c50c8a5cdc6c242ae87d8faf13ad830fcea9e27364749614219bb221a3d6ac36a

diff --git a/app-text/calibre/calibre-1.47.ebuild b/app-text/calibre/calibre-1.47.ebuild
deleted file mode 100644
index f1296bd..0000000
--- a/app-text/calibre/calibre-1.47.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-[[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
-SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.20.2:=[qt4,xpdf-headers(+)]
-	>=dev-lang/python-2.7.1:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-0.82.2[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt4-4.9.6[X,svg,webkit,python_targets_python2_7(-)]
-	dev-qt/qtdbus:4=
-	dev-qt/qtsvg:4=
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	>=media-libs/freetype-2:=
-	>=media-libs/libwmf-0.2.8
-	>=media-libs/libmtp-1.1.5:=
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	>=x11-misc/xdg-utils-1.0.2-r2"
-
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-S=${WORKDIR}/${PN}
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py || die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	# C locale: if LC_ALL=C do not raise an exception when locale cannot be canonicalized
-	epatch \
-		"${FILESDIR}/${PN}-1.34-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-
-	# override install path for bash-completions
-	local mybcd="${D}/$(get_bashcompdir)"
-	sed -e "s#^def \(get_bash_completion_path.*\)\$#def \1\n    return os.path.join('${mybcd}','calibre')\n\ndef old_\1#" \
-	  -i "${S}"/src/calibre/linux.py || die "Could not fix bash-completions install path"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-#	dobashcomp "${ED}"usr/share/bash-completion/completions/calibre
-#	rm -r "${ED}"usr/share/bash-completion
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-1.48-r1.ebuild b/app-text/calibre/calibre-1.48-r1.ebuild
deleted file mode 100644
index 9166fb2..0000000
--- a/app-text/calibre/calibre-1.48-r1.ebuild
+++ /dev/null
@@ -1,248 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="sqlite,ssl"
-
-inherit bash-completion-r1 distutils-r1 eutils fdo-mime multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-[[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
-SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.20.2:=[qt4,xpdf-headers(+)]
-	>=dev-libs/chmlib-0.40:=
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[${PYTHON_USEDEP}]
-	>=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}]
-	>=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
-	>=dev-python/cssutils-0.9.9[${PYTHON_USEDEP}]
-	>=dev-python/dbus-python-0.82.2[${PYTHON_USEDEP}]
-	>=dev-python/dnspython-1.6.0:0[${PYTHON_USEDEP}]
-	>=dev-python/lxml-3.2.1[${PYTHON_USEDEP}]
-	>=dev-python/mechanize-0.1.11[${PYTHON_USEDEP}]
-	>=dev-python/python-dateutil-1.4.1[${PYTHON_USEDEP}]
-	<dev-python/PyQt4-4.11.3[X,svg,webkit,${PYTHON_USEDEP}]
-	dev-python/netifaces[${PYTHON_USEDEP}]
-	dev-qt/qtdbus:4=
-	dev-qt/qtsvg:4=
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	>=media-libs/freetype-2:=
-	>=media-libs/libwmf-0.2.8
-	>=media-libs/libmtp-1.1.5:=
-	virtual/libusb:1=
-	dev-python/pillow[${PYTHON_USEDEP}]
-	>=x11-misc/xdg-utils-1.0.2-r2"
-
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5[${PYTHON_USEDEP}]
-	>=virtual/podofo-build-0.8.2"
-
-S="${WORKDIR}"/${PN}
-
-PATCHES=(
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	# C locale: if LC_ALL=C do not raise an exception when locale cannot be canonicalized
-	"${FILESDIR}"/${PN}-1.34-no_updates_dialog.patch
-	"${FILESDIR}"/${PN}-disable_plugins.patch
-	)
-
-export_xdg_dirs() {
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-}
-
-python_prepare_all() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed \
-		-e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed \
-		-e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py || die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# override install path for bash-completions
-	local mybcd="${D}/$(get_bashcompdir)"
-	sed -e "s#^def \(get_bash_completion_path.*\)\$#def \1\n    return os.path.join('${mybcd}','calibre')\n\ndef old_\1#" \
-	  -i "${S}"/src/calibre/linux.py || die "Could not fix bash-completions install path"
-
-	tc-export CC CXX
-
-	distutils-r1_python_prepare_all
-}
-
-python_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database} || die
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database} || die
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	export_xdg_dirs
-	mkdir -p "${XDG_CONFIG_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
-
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir $(python_get_sitedir) # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	esetup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}"
-}
-
-python_install_all() {
-	export_xdg_dirs
-
-	python_replicate_script "${ED}"/usr/bin/*
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local || die
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop
-
-	find "${ED}"usr/share -type d -empty -delete || die
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Compiling python modules"
-	python_foreach_impl python_optimize "${ED}"usr/$(get_libdir)/${PN}
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-
-	bashcomp_alias calibre \
-		lrf2lrs \
-		ebook-meta \
-		ebook-polish \
-		lrfviewer \
-		ebook-viewer \
-		ebook-edit \
-		fetch-ebook-metadata \
-		calibre-smtp \
-		calibre-server \
-		calibre-debug \
-		ebook-device \
-		ebook-convert
-
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}
-
-pkg_postrm() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.27.0.ebuild b/app-text/calibre/calibre-2.27.0.ebuild
deleted file mode 100644
index 83f81ca..0000000
--- a/app-text/calibre/calibre-2.27.0.ebuild
+++ /dev/null
@@ -1,229 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-[[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
-SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.1:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.2.0[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.31.0.ebuild b/app-text/calibre/calibre-2.31.0.ebuild
deleted file mode 100644
index 83f81ca..0000000
--- a/app-text/calibre/calibre-2.31.0.ebuild
+++ /dev/null
@@ -1,229 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-[[ ${PV} == ${PV%.*}.${PV#*.} ]] && MY_PV=${PV}.0 || MY_PV=${PV}
-SRC_URI="http://sourceforge.net/projects/calibre/files/${MY_PV}/${PN}-${MY_PV}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.1:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.2.0[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.33.0.ebuild b/app-text/calibre/calibre-2.33.0.ebuild
deleted file mode 100644
index 0e337a7..0000000
--- a/app-text/calibre/calibre-2.33.0.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.9:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.34.0.ebuild b/app-text/calibre/calibre-2.34.0.ebuild
deleted file mode 100644
index 0e337a7..0000000
--- a/app-text/calibre/calibre-2.34.0.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.9:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.35.0-r1.ebuild b/app-text/calibre/calibre-2.35.0-r1.ebuild
deleted file mode 100644
index 0c31d15..0000000
--- a/app-text/calibre/calibre-2.35.0-r1.ebuild
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.9:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	virtual/python-dnspython[python_targets_python2_7(-)]
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/calibre-2.35.0.ebuild b/app-text/calibre/calibre-2.35.0.ebuild
deleted file mode 100644
index 04d305e..0000000
--- a/app-text/calibre/calibre-2.35.0.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="http://calibre-ebook.com/"
-SRC_URI="http://download.calibre-ebook.com/${PV}/${P}.tar.xz"
-
-LICENSE="
-	GPL-3+
-	GPL-3
-	GPL-2+
-	GPL-2
-	GPL-1+
-	LGPL-3+
-	LGPL-2.1+
-	LGPL-2.1
-	BSD
-	MIT
-	Old-MIT
-	Apache-2.0
-	public-domain
-	|| ( Artistic GPL-1+ )
-	CC-BY-3.0
-	OFL-1.1
-	PSF-2
-	unRAR
-"
-KEYWORDS="~amd64 ~arm ~x86"
-SLOT="0"
-IUSE="+udisks"
-
-COMMON_DEPEND="
-	>=app-text/podofo-0.8.2:=
-	>=app-text/poppler-0.26.5[qt5]
-	>=dev-lang/python-2.7.9:2.7[sqlite,ssl]
-	>=dev-libs/chmlib-0.40:=
-	dev-libs/glib:2
-	>=dev-libs/icu-4.4:=
-	>=dev-python/apsw-3.7.17[python_targets_python2_7(-)]
-	>=dev-python/beautifulsoup-3.0.5:python-2[python_targets_python2_7(-)]
-	|| (
-		>=dev-python/dnspython-1.6.0:0[python_targets_python2_7(-)]
-		virtual/python-dnspython[python_targets_python2_7(-)]
-	)
-	>=dev-python/cssselect-0.7.1[python_targets_python2_7(-)]
-	>=dev-python/cssutils-0.9.9[python_targets_python2_7(-)]
-	>=dev-python/dbus-python-1.2.0[python_targets_python2_7(-)]
-	>=dev-python/lxml-3.2.1[python_targets_python2_7(-)]
-	>=dev-python/mechanize-0.1.11[python_targets_python2_7(-)]
-	dev-python/netifaces[python_targets_python2_7(-)]
-	dev-python/psutil[python_targets_python2_7(-)]
-	>=dev-python/pygments-2.0.1[python_targets_python2_7(-)]
-	>=dev-python/python-dateutil-1.4.1[python_targets_python2_7(-)]
-	>=dev-python/PyQt5-5.3.1[gui,svg,webkit,widgets,network,printsupport,python_targets_python2_7(-)]
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtwidgets:5
-	media-fonts/liberation-fonts
-	>=media-gfx/imagemagick-6.5.9[jpeg,png]
-	media-libs/fontconfig
-	>=media-libs/freetype-2:=
-	>=media-libs/libmtp-1.1.5:=
-	>=media-libs/libwmf-0.2.8
-	sys-libs/zlib
-	virtual/libusb:1=
-	dev-python/pillow[python_targets_python2_7(-)]
-	x11-libs/libX11
-	x11-libs/libXext
-	x11-libs/libXrender
-	>=x11-misc/xdg-utils-1.0.2-r2
-	udisks? ( virtual/libudev )"
-RDEPEND="${COMMON_DEPEND}
-	udisks? ( || ( sys-fs/udisks:2 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
-	>=dev-python/setuptools-0.6_rc5
-	>=virtual/podofo-build-0.8.2"
-
-src_prepare() {
-	# Fix outdated version constant.
-	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
-	#	-i src/calibre/constants.py || \
-	#	die "sed failed to patch constants.py"
-
-	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
-	# calls xdg-* (bug #258938).
-	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
-		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
-		-e "s|PreserveMIMEDefaults():||" \
-		-e "s|xdg-icon-resource install|\\0 --mode user|" \
-		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
-		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
-		-i src/calibre/linux.py || die "sed failed to patch linux.py"
-
-	# Disable unnecessary privilege dropping for bug #287067.
-	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-		-i setup/install.py || die "sed failed to patch install.py"
-
-	sed -e "/^            self\\.check_call(qmc + \\[.*\\.pro'\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
-		-i setup/extensions.py || die "sed failed to patch extensions.py"
-
-	# use system beautifulsoup, instead of bundled
-	rm -f "${S}"/src/calibre/ebooks/BeautifulSoup.py \
-		|| die "could not remove bundled beautifulsoup"
-	find "${S}" -type f -name \*.py -exec \
-		sed -e 's/calibre.ebooks.BeautifulSoup/BeautifulSoup/' -i {} + \
-		|| die "could not sed bundled beautifulsoup out of the source tree"
-
-	# avoid failure of xdg tools to recognize vendor prefix
-	sed -e "s|xdg-icon-resource install|xdg-icon-resource install --novendor|" \
-		-e "s|'xdg-mime', 'install'|'xdg-mime', 'install', '--novendor'|" \
-		-e "s|'xdg-desktop-menu', 'install'|'xdg-desktop-menu', 'install', '--novendor'|" \
-		-i "${S}"/src/calibre/linux.py || die 'sed failed'
-
-	# no_updates: do not annoy user with "new version is availible all the time
-	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
-	epatch \
-		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
-}
-
-src_install() {
-	# Bypass kbuildsycoca and update-mime-database in order to
-	# avoid sandbox violations if xdg-mime tries to call them.
-	cat - > "${T}/kbuildsycoca" <<-EOF
-	#!${BASH}
-	echo $0 : $@
-	exit 0
-	EOF
-
-	cp "${T}"/{kbuildsycoca,update-mime-database}
-	chmod +x "${T}"/{kbuildsycoca,update-mime-database}
-
-	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
-
-	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
-	# violation with kbuildsycoca as in bug #287067, comment #13.
-	export -n DISPLAY
-
-	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
-	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-	#    return _parse_localename(localename)
-	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-	#    raise ValueError, 'unknown locale: %s' % localename
-	#ValueError: unknown locale: 46
-	export -n LANGUAGE
-
-	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-	# variables to point to our fake temporary $HOME.
-	export HOME="${T}/fake_homedir"
-	export XDG_CONFIG_HOME="${HOME}/.config"
-	export XDG_DATA_HOME="${HOME}/.local/share"
-	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
-	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}"
-
-	tc-export CC CXX
-	# Bug #334243 - respect LDFLAGS when building extensions
-	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
-	local libdir=$(get_libdir)
-	[[ -n $libdir ]] || die "get_libdir returned an empty string"
-
-	# Bug #472690 - Avoid sandbox violation for /dev/dri/card0.
-	local x
-	for x in /dev/dri/card[0-9] ; do
-		[[ -e ${x} ]] && addpredict ${x}
-	done
-
-	dodir "/usr/$(get_libdir)/python2.7/site-packages" # for init_calibre.py
-	PATH=${T}:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
-	"${EPREFIX}"/usr/bin/python2.7 setup.py install \
-		--root="${D}" \
-		--prefix="${EPREFIX}/usr" \
-		--libdir="${EPREFIX}/usr/${libdir}" \
-		--staging-root="${ED}usr" \
-		--staging-libdir="${ED}usr/${libdir}" || die
-
-	grep -rlZ "${ED}" "${ED}" | xargs -0 sed -e "s:${D}:/:g" -i ||
-		die "failed to fix harcoded \$D in paths"
-
-	# The menu entries end up here due to '--mode user' being added to
-	# xdg-* options in src_prepare.
-	dodir /usr/share/mime/packages
-	chmod -fR a+rX,u+w,g-w,o-w "${HOME}"/.local
-	mv "${HOME}"/.local/share/mime/packages/* "${ED}"usr/share/mime/packages/ ||
-		die "failed to register mime types"
-	dodir /usr/share/icons
-	mv "${HOME}"/.local/share/icons/* "${ED}"usr/share/icons/ ||
-		die "failed to install icon files"
-
-	domenu "${HOME}"/.local/share/applications/*.desktop ||
-		die "failed to install .desktop menu files"
-
-	find "${ED}"usr/share -type d -empty -delete
-
-	cd "${ED}"/usr/share/calibre/fonts/liberation || die
-	local x
-	for x in * ; do
-		[[ -f ${EROOT}usr/share/fonts/liberation-fonts/${x} ]] || continue
-		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
-	done
-
-	einfo "Converting python shebangs"
-	while read -r -d $'\0' ; do
-		local shebang=$(head -n1 "$REPLY")
-		if [[ ${shebang} == "#!"*python* ]] ; then
-			sed -i -e "1s:.*:#!${EPREFIX}/usr/bin/python2.7:" "$REPLY" || \
-				die "sed failed"
-		fi
-	done < <(find "${ED}" -type f -print0)
-
-	einfo "Compiling python modules"
-	"${EPREFIX}"/usr/bin/python2.7 -m compileall -q -f \
-		-d "${EPREFIX}"/usr/lib/calibre "${ED}"usr/lib/calibre || die
-
-	newinitd "${FILESDIR}"/calibre-server.init calibre-server
-	newconfd "${FILESDIR}"/calibre-server.conf calibre-server
-}
-
-pkg_postinst() {
-	fdo-mime_desktop_database_update
-	fdo-mime_mime_database_update
-}

diff --git a/app-text/calibre/files/calibre-1.34-no_updates_dialog.patch b/app-text/calibre/files/calibre-1.34-no_updates_dialog.patch
deleted file mode 100644
index dd6b394..0000000
--- a/app-text/calibre/files/calibre-1.34-no_updates_dialog.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/src/calibre/gui2/main.py	2014-01-17 11:49:16.000000000 +0800
-+++ b/src/calibre/gui2/main.py	2014-01-18 18:28:53.322911344 +0800
-@@ -37,8 +37,9 @@
-                       help=_('Start minimized to system tray.'))
-     parser.add_option('-v', '--verbose', default=0, action='count',
-                       help=_('Ignored, do not use. Present only for legacy reasons'))
--    parser.add_option('--no-update-check', default=False, action='store_true',
--            help=_('Do not check for updates'))
-+    parser.add_option('--update-check', dest='no_update_check', default=True,
-+            action='store_false',
-+            help=_('Check for updates'))
-     parser.add_option('--ignore-plugins', default=False, action='store_true',
-             help=_('Ignore custom plugins, useful if you installed a plugin'
-                 ' that is preventing calibre from starting'))
---- a/src/calibre/gui2/update.py	2014-04-24 22:02:21.000000000 -0400
-+++ b/src/calibre/gui2/update.py	2014-05-01 12:02:27.631316967 -0400
-@@ -139,6 +139,8 @@
-             self.update_checker.update_found.connect(self.update_found,
-                     type=Qt.QueuedConnection)
-             self.update_checker.start()
-+        else:
-+            self.update_checker = None
- 
-     def recalc_update_label(self, number_of_plugin_updates):
-         self.update_found('%s%s%d'%(self.last_newest_calibre_version, VSEP,
---- a/src/calibre/gui2/ui.py	2014-04-24 22:02:21.000000000 -0400
-+++ b/src/calibre/gui2/ui.py	2014-05-01 11:53:58.371307671 -0400
-@@ -858,7 +858,8 @@
-         if write_settings:
-             self.write_settings()
-         self.check_messages_timer.stop()
--        self.update_checker.terminate()
-+        if self.update_checker is not None:
-+            self.update_checker.terminate()
-         self.listener.close()
-         self.job_manager.server.close()
-         self.job_manager.threaded_server.close()


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2020-02-09 20:50 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2020-02-09 20:50 UTC (permalink / raw
  To: gentoo-commits

commit:     e2488d93b0267444a7e14c52da34e31ec0b97e18
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 20:46:19 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 20:50:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2488d93

app-text/calibre: kobo py3 fix for bug 708742

Closes: https://bugs.gentoo.org/708742
Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 ...e-4.10.1-r1.ebuild => calibre-4.10.1-r2.ebuild} |  3 +-
 ...bre-4.9.1-r1.ebuild => calibre-4.9.1-r2.ebuild} |  3 +-
 ...Ignore-TypeError-sorting-collections-kobo.patch | 63 ++++++++++++++++++++++
 3 files changed, 67 insertions(+), 2 deletions(-)

diff --git a/app-text/calibre/calibre-4.10.1-r1.ebuild b/app-text/calibre/calibre-4.10.1-r2.ebuild
similarity index 98%
rename from app-text/calibre/calibre-4.10.1-r1.ebuild
rename to app-text/calibre/calibre-4.10.1-r2.ebuild
index 87653101234..2004b89741d 100644
--- a/app-text/calibre/calibre-4.10.1-r1.ebuild
+++ b/app-text/calibre/calibre-4.10.1-r2.ebuild
@@ -121,7 +121,8 @@ src_prepare() {
 	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
 	eapply \
 		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
+		"${FILESDIR}/${PN}-disable_plugins.patch" \
+		"${FILESDIR}/${PN}-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch"
 
 	eapply_user
 

diff --git a/app-text/calibre/calibre-4.9.1-r1.ebuild b/app-text/calibre/calibre-4.9.1-r2.ebuild
similarity index 98%
rename from app-text/calibre/calibre-4.9.1-r1.ebuild
rename to app-text/calibre/calibre-4.9.1-r2.ebuild
index 10509962f2e..3718b23741e 100644
--- a/app-text/calibre/calibre-4.9.1-r1.ebuild
+++ b/app-text/calibre/calibre-4.9.1-r2.ebuild
@@ -121,7 +121,8 @@ src_prepare() {
 	# disable_plugins: walking sec-hole, wait for upstream to use GHNS interface
 	eapply \
 		"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
-		"${FILESDIR}/${PN}-disable_plugins.patch"
+		"${FILESDIR}/${PN}-disable_plugins.patch" \
+		"${FILESDIR}/${PN}-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch"
 
 	eapply_user
 

diff --git a/app-text/calibre/files/calibre-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch b/app-text/calibre/files/calibre-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch
new file mode 100644
index 00000000000..fb55e0025b7
--- /dev/null
+++ b/app-text/calibre/files/calibre-4.9.1-py3-Ignore-TypeError-sorting-collections-kobo.patch
@@ -0,0 +1,63 @@
+From 6f947d88d323bb08bb6e076d442662aa281fe197 Mon Sep 17 00:00:00 2001
+From: Zac Medico <zmedico@gentoo.org>
+Date: Sun, 9 Feb 2020 12:16:04 -0800
+Subject: [PATCH] py3: Ignore TypeError when sorting device collections for
+ kobo driver
+
+https://github.com/kovidgoyal/calibre/pull/1098
+
+Use the same approach as the usbms driver when cmp raises a
+TypeError (see a8deb4b1f8dfb768a32b95b1540be32d5d6e871e).
+
+This should suppress the following error which was reported for
+python3 and not python2:
+
+Traceback (most recent call last):
+  File "/usr/lib64/calibre/calibre/gui2/device.py", line 90, in run
+    self.result = self.func(*self.args, **self.kwargs)
+  File "/usr/lib64/calibre/calibre/gui2/device.py", line 543, in _sync_booklists
+    self.device.sync_booklists(booklists, end_session=False)
+  File "/usr/lib64/calibre/calibre/devices/kobo/driver.py", line 970, in sync_booklists
+    self.update_device_database_collections(blist, collections, oncard)
+  File "/usr/lib64/calibre/calibre/devices/kobo/driver.py", line 2398, in update_device_database_collections
+    collections = booklists.get_collections(collections_attributes) if bookshelf_attribute else None
+  File "/usr/lib64/calibre/calibre/devices/kobo/books.py", line 314, in get_collections
+    books = sorted(itervalues(lpaths), key=cmp_to_key(none_cmp))
+  File "/usr/lib64/calibre/calibre/devices/kobo/books.py", line 307, in none_cmp
+    c = cmp(x, y)
+  File "/usr/lib64/calibre/polyglot/builtins.py", line 106, in cmp
+    return (a > b) - (a < b)
+TypeError: '>' not supported between instances of 'float' and 'str'
+
+See: https://bugs.gentoo.org/708742
+---
+ src/calibre/devices/kobo/books.py | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/src/calibre/devices/kobo/books.py b/src/calibre/devices/kobo/books.py
+index f725751d00..fc1dee6b7e 100644
+--- a/src/calibre/devices/kobo/books.py
++++ b/src/calibre/devices/kobo/books.py
+@@ -304,11 +304,17 @@ class KTCollectionsBookList(CollectionsBookList):
+                 return -1
+             if isinstance(x, string_or_bytes) and isinstance(y, string_or_bytes):
+                 x, y = sort_key(force_unicode(x)), sort_key(force_unicode(y))
+-            c = cmp(x, y)
++            try:
++                c = cmp(x, y)
++            except TypeError:
++                c = 0
+             if c != 0:
+                 return c
+             # same as above -- no sort_key needed here
+-            return cmp(xx[2], yy[2])
++            try:
++                return cmp(xx[2], yy[2])
++            except TypeError:
++                return 0
+ 
+         for category, lpaths in iteritems(collections):
+             books = sorted(itervalues(lpaths), key=cmp_to_key(none_cmp))
+-- 
+2.24.1
+


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2022-01-21  4:11 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2022-01-21  4:11 UTC (permalink / raw
  To: gentoo-commits

commit:     b9abd1b1087ad02c6393ff070bc4fd5f6119b4c6
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 21 04:06:56 2022 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Jan 21 04:06:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9abd1b1

app-text/calibre: Bump to version 5.35.0

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/calibre/Manifest                          |   1 +
 app-text/calibre/calibre-5.35.0.ebuild             | 315 +++++++++++++++++++++
 .../calibre/files/calibre-5.35.0-jxr-test.patch    |  24 ++
 3 files changed, 340 insertions(+)

diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
index 74be0f200b5e..e7224900cc98 100644
--- a/app-text/calibre/Manifest
+++ b/app-text/calibre/Manifest
@@ -1,3 +1,4 @@
 DIST calibre-5.16.0-SIP-v4.patch.xz 6768 BLAKE2B b939233266c7cab0fa71ccdeb748bbcffbf16248081ccf0ab313420fe3898954da71e0796b3d6c44e93c636113221f95fa6affc6be97bf41f4086a909b2849f9 SHA512 eb19e6bb328f60eb4af2c38d54c3d2a09989d41d71d27de10ab5ae443af902c3c12fc70042d4735dd785573cb63bb7d7a10ae5f7ed72afc1e1a9c6aacaf64aec
 DIST calibre-5.16.1.tar.xz 36757204 BLAKE2B 71114eed723180142f5428a680d8c5ceabcd007acbc6a70a9298e45a9f21fc793f0ef86bf60b36c96bbd15e9e3f8d8638d179872fb6ff1f9b9f5e31a93e65ba1 SHA512 41cf29cc32c7af08215baf80609f8f099d44f2b82d34181451cbf3ed1648e07d64712dba9ff0ddec5bad3d342c7d8bde40bb822f6bd5fb93a4b29d25cf188aae
 DIST calibre-5.33.2.tar.xz 37081104 BLAKE2B 7ef40e39d47b10378918dcdefbec5925d9a43f47c345ccb6fd8811b99a2c417923467724f3ba92152b0951e473af7dd20dcb779e1fc6ad7970ac527fc06fe09c SHA512 5886730000005f4e36373ef6d0b3da4e4f06941886f05d1703420720c16aa913dcfca9358c33e4fcec764f0e4bd24e0223ff35421b41f1cc3f818d6d53896d64
+DIST calibre-5.35.0.tar.xz 37801424 BLAKE2B fcef3dfc3fa09d3a6324b3b9a860a3f0eb4cfe1311df84aea39beed9c0f42e620bfe3ec1a33c89e0e701b955fe44cf9b15f1e4b0f24529847c9b28d2eb7b2fa2 SHA512 b99a5c86a48d29bcc6f6188f9e4a20fe8ac1c4115147a964596e2bc3635d20c2556ae0be90c7deac95d4ef430b6ce6c7b712510358f71a22817c9360203b1f11

diff --git a/app-text/calibre/calibre-5.35.0.ebuild b/app-text/calibre/calibre-5.35.0.ebuild
new file mode 100644
index 000000000000..59a9f2a0e0b8
--- /dev/null
+++ b/app-text/calibre/calibre-5.35.0.ebuild
@@ -0,0 +1,315 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_REQ_USE="ipv6(+),sqlite,ssl"
+
+inherit toolchain-funcs python-single-r1 xdg-utils
+
+DESCRIPTION="Ebook management application"
+HOMEPAGE="https://calibre-ebook.com/"
+SRC_URI="https://download.calibre-ebook.com/${PV}/${P}.tar.xz"
+
+LICENSE="
+	GPL-3+
+	GPL-3
+	GPL-2+
+	GPL-2
+	GPL-1+
+	LGPL-3+
+	LGPL-2.1+
+	LGPL-2.1
+	BSD
+	MIT
+	Old-MIT
+	Apache-2.0
+	public-domain
+	|| ( Artistic GPL-1+ )
+	CC-BY-3.0
+	OFL-1.1
+	PSF-2
+"
+KEYWORDS="~amd64 ~arm ~x86"
+SLOT="0"
+IUSE="ios +udisks"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+	>=app-text/hunspell-1.7:=
+	>=app-text/podofo-0.9.6_pre20171027:=
+	>=app-text/poppler-0.26.5[qt5]
+	dev-libs/glib:2=
+	dev-libs/hyphen:=
+	>=dev-libs/icu-57.1:=
+	dev-libs/libinput:=
+	>=dev-libs/dbus-glib-0.106
+	dev-libs/snowball-stemmer:=
+	>=sys-apps/dbus-1.10.8
+	$(python_gen_cond_dep '
+		app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]
+		>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
+		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+		dev-python/cchardet[${PYTHON_USEDEP}]
+		>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]
+		>=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
+		>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
+		>=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
+		dev-python/dnspython[${PYTHON_USEDEP}]
+		>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
+		>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
+		>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
+		dev-python/jeepney[${PYTHON_USEDEP}]
+		>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
+		>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
+		>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
+		>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
+		>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
+		>=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
+		>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
+		>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
+		dev-python/pycryptodome[${PYTHON_USEDEP}]
+		>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
+		>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
+		>=dev-python/PyQt5-5.15.5_pre2107091435[gui,svg,widgets,network,printsupport,${PYTHON_USEDEP}]
+		>=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
+		>=dev-python/PyQtWebEngine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
+		dev-python/regex[${PYTHON_USEDEP}]
+		dev-python/zeroconf[${PYTHON_USEDEP}]
+	')
+	dev-qt/qtcore:5=
+	dev-qt/qtdbus:5=
+	dev-qt/qtgui:5=[jpeg]
+	>=dev-qt/qtwebengine-5.12
+	dev-qt/qtwidgets:5=
+	dev-util/desktop-file-utils
+	dev-util/gtk-update-icon-cache
+	media-fonts/liberation-fonts
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2:=
+	>=media-libs/libmtp-1.1.11:=
+	>=media-libs/libwmf-0.2.8
+	>=media-gfx/optipng-0.7.6
+	>=sys-libs/zlib-1.2.11:=
+	virtual/libusb:1=
+	x11-libs/libxkbcommon:=
+	x11-libs/libX11:=
+	x11-libs/libXext:=
+	x11-libs/libXrender:=
+	x11-misc/shared-mime-info
+	>=x11-misc/xdg-utils-1.0.2-r2
+	ios? (
+		>=app-pda/usbmuxd-1.0.8
+		>=app-pda/libimobiledevice-1.2.0
+	)
+	udisks? ( virtual/libudev )"
+RDEPEND="${COMMON_DEPEND}
+	udisks? ( sys-fs/udisks:2 )"
+DEPEND="${COMMON_DEPEND}"
+BDEPEND="$(python_gen_cond_dep '
+		>=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
+		>=dev-python/sip-5[${PYTHON_USEDEP}]
+	')
+	>=virtual/podofo-build-0.9.6_pre20171027
+	virtual/pkgconfig"
+
+PATCHES=(
+	# Don't prompt the user for updates - they've installed via
+	# an ebuild.
+	"${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch"
+
+	# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
+	# We don't (yet?) package libjxr and it seems to be dead upstream
+	# (last commit in 2017)
+	"${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
+
+	# TODO:
+	# test_qt tries to load a bunch of images using Qt and it currently fails
+	# due to some presumably missing dependencies. This is important and
+	# we need to look into it, but at time of writing, none of the tests
+	# are even bring run, so I'd like to return to this later.
+	# We don't want to skip test_qt entirely, so just skip this particular
+	# assert for now.
+	"${FILESDIR}/${PN}-5.31.0-qt-image-test.patch"
+)
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]] && tc-is-gcc && [[ $(gcc-major-version) -lt 6 ]]; then
+		eerror "Calibre cannot be built with this version of gcc."
+		eerror "You need at least gcc-6.0"
+		die "Your C compiler is too old for this package."
+	fi
+}
+
+src_prepare() {
+	default
+
+	# Warning:
+	#
+	# While it might be rather tempting to add yet another sed here,
+	# please don't. There have been several bugs in Gentoo's packaging
+	# of calibre from seds-which-become-stale. Please consider
+	# creating a patch instead, but in any case, run the test suite
+	# and ensure it passes.
+	#
+	# If in doubt about a problem, checking Fedora or Arch Linux's packaging
+	# is recommended, as Arch Linux's PKGBUILD is maintained by a Calibre
+	# contributor. Or just ask them.
+
+	# Fix outdated version constant.
+	#sed -e "s#\\(^numeric_version =\\).*#\\1 (${PV//./, })#" \
+	#	-i src/calibre/constants.py || \
+	#	die "sed failed to patch constants.py"
+
+	# Avoid sandbox violation in /usr/share/gnome/apps when linux.py
+	# calls xdg-* (bug #258938).
+	sed -e "s|'xdg-desktop-menu', 'install'|\\0, '--mode', 'user'|" \
+		-e "s|check_call(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
+		-e "s|\\(CurrentDir(tdir)\\), \\\\\$|\\1:|" \
+		-e "s|, PreserveMIMEDefaults():|:|" \
+		-e "s|'xdg-icon-resource', 'install'|\\0, '--mode', 'user'|" \
+		-e "s|cmd\[2\]|cmd[4]|" \
+		-e "s|cc(\\['xdg-desktop-menu', 'forceupdate'\\])|#\\0|" \
+		-e "s|'xdg-mime', 'install'|\\0, '--mode', 'user'|" \
+		-i src/calibre/linux.py || die "sed failed to patch linux.py"
+
+	# Disable unnecessary privilege dropping for bug #287067.
+	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
+		-i setup/install.py || die "sed failed to patch install.py"
+	sed -e "/^            os.chdir(os.path.join(src_dir, 'build'))$/a\
+\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
+'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
+'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
+'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
+'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
+		-e "s|open(self.j(bdir, '.qmake.conf'), 'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += ${LDFLAGS}')|" \
+		-i setup/build.py || die "sed failed to patch build.py"
+}
+
+src_compile() {
+	# TODO: get qmake called by setup.py to respect CC and CXX too
+	tc-export CC CXX
+
+	# bug 821871
+	local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
+	export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
+
+	PATH="${T}/bin:${PATH}" ${EPYTHON} setup.py build || die
+}
+
+src_test() {
+	# Skipped tests:
+	# - 7z (unpackaged Python dependency: py7zr)
+	# - test_unrar (unpackaged Python dependency: unrardll)
+	#
+	# Note that we currently have a hack to skip one part of test_qt!
+	# See PATCHES for more.
+	CALIBRE_PY3_PORT=1 ${PYTHON} setup.py test \
+			--exclude-test-name 7z \
+			--exclude-test-name test_searching \
+			--exclude-test-name test_unrar || die
+}
+
+src_install() {
+	# calibre works with python 3, so remove the python 2 constraint
+	export CALIBRE_PY3_PORT=1
+
+	# Bypass kbuildsycoca and update-mime-database in order to
+	# avoid sandbox violations if xdg-mime tries to call them.
+	mkdir "${T}/bin" || die
+	cat - > "${T}/bin/kbuildsycoca" <<-EOF
+	#!${BASH}
+	echo $0 : $@
+	exit 0
+	EOF
+
+	cp "${T}"/bin/{kbuildsycoca,update-mime-database} || die
+	chmod +x "${T}"/bin/{kbuildsycoca,update-mime-database} || die
+
+	export QMAKE="${EPREFIX}/usr/$(get_libdir)/qt5/bin/qmake"
+
+	# Unset DISPLAY in order to prevent xdg-mime from triggering a sandbox
+	# violation with kbuildsycoca as in bug #287067, comment #13.
+	export -n DISPLAY
+
+	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
+	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
+	#    return _parse_localename(localename)
+	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
+	#    raise ValueError, 'unknown locale: %s' % localename
+	#ValueError: unknown locale: 46
+	export -n LANG LANGUAGE ${!LC_*}
+	export LC_ALL=C.utf8 #709682
+
+	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
+	# variables to point to our fake temporary $HOME.
+	export HOME="${T}/fake_homedir"
+	export XDG_CONFIG_HOME="${HOME}/.config"
+	export XDG_DATA_HOME="${HOME}/.local/share"
+	export CALIBRE_CONFIG_DIRECTORY="${XDG_CONFIG_HOME}/calibre"
+	mkdir -p "${XDG_DATA_HOME}" "${CALIBRE_CONFIG_DIRECTORY}" || die
+
+	tc-export CC CXX
+	# Bug #334243 - respect LDFLAGS when building extensions
+	export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS"
+	local libdir=$(get_libdir)
+	[[ -n $libdir ]] || die "get_libdir returned an empty string"
+
+	addpredict /dev/dri #665310
+
+	PATH=${T}/bin:${PATH} PYTHONPATH=${S}/src${PYTHONPATH:+:}${PYTHONPATH} \
+		"${PYTHON}" setup.py install \
+		--root="${D}" \
+		--prefix="${EPREFIX}/usr" \
+		--libdir="${EPREFIX}/usr/${libdir}" \
+		--staging-root="${ED}/usr" \
+		--staging-libdir="${ED}/usr/${libdir}" || die
+
+	find "${ED}"/usr/share -type d -empty -delete
+
+	cd "${ED}"/usr/share/calibre/fonts/liberation || die
+	local x
+	for x in * ; do
+		[[ -f ${EPREFIX}/usr/share/fonts/liberation-fonts/${x} ]] || continue
+		ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
+	done
+
+	einfo "Converting python shebangs"
+	python_fix_shebang --force "${ED}"
+
+	einfo "Compiling python modules"
+	python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
+
+	newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
+	newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
+}
+
+pkg_preinst() {
+	# Indentify stray directories from upstream's "Binary install"
+	# method (see bug 622728).
+	CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
+	CALIBRE_LIB_CONTENT=$(for x in "${ED}${CALIBRE_LIB_DIR}"/*; do
+		printf -- "${x##*/} "; done) || die "Failed to list ${ED}${CALIBRE_LIB_DIR}"
+}
+
+pkg_postinst() {
+	[[ -n ${CALIBRE_LIB_DIR} ]] || die "CALIBRE_LIB_DIR is unset"
+	local x
+	for x in "${EROOT}${CALIBRE_LIB_DIR}"/*; do
+		if [[ " ${CALIBRE_LIB_CONTENT} " != *" ${x##*/} "* ]]; then
+			elog "Purging '${x}'"
+			rm -rf "${x}"
+		fi
+	done
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+	xdg_icon_cache_update
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+	xdg_icon_cache_update
+}

diff --git a/app-text/calibre/files/calibre-5.35.0-jxr-test.patch b/app-text/calibre/files/calibre-5.35.0-jxr-test.patch
new file mode 100644
index 000000000000..bec72c15cb8b
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.35.0-jxr-test.patch
@@ -0,0 +1,24 @@
+Avoid calling libjxr's JxrDecApp as we currently don't package it.
+--- a/src/calibre/utils/img.py
++++ b/src/calibre/utils/img.py
+@@ -118,8 +118,6 @@
+     i = QImage()
+     if not i.loadFromData(data):
+         q = what(None, data)
+-        if q == 'jxr':
+-            return load_jxr_data(data)
+         raise NotImage(f'Not a valid image (detected type: {q})')
+     return i
+ 
+@@ -645,11 +643,6 @@
+     despeckle_image(img)
+     remove_borders_from_image(img)
+     image_to_data(img, fmt='GIF')
+-    raw = subprocess.Popen([get_exe_path('JxrDecApp'), '-h'],
+-                           creationflags=subprocess.DETACHED_PROCESS if iswindows else 0,
+-                           stdout=subprocess.PIPE).stdout.read()
+-    if b'JPEG XR Decoder Utility' not in raw:
+-        raise SystemExit('Failed to run JxrDecApp')
+ # }}}
+ 
+ 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2023-10-18  4:26 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2023-10-18  4:26 UTC (permalink / raw
  To: gentoo-commits

commit:     fe2498a0303f60e2e73a0f060ed69ee4dd7e65ca
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Oct  2 23:45:55 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 04:26:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe2498a0

app-text/calibre: fix compatibility with recent zeroconf

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/calibre/calibre-5.44.0-r2.ebuild          |  3 +++
 ...44.0-Fix-compatibility-with-zeroconf-0.73.patch | 26 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/app-text/calibre/calibre-5.44.0-r2.ebuild b/app-text/calibre/calibre-5.44.0-r2.ebuild
index 8e1e182eb588..0437387bea1e 100644
--- a/app-text/calibre/calibre-5.44.0-r2.ebuild
+++ b/app-text/calibre/calibre-5.44.0-r2.ebuild
@@ -135,6 +135,9 @@ PATCHES=(
 	# We don't (yet?) package libjxr and it seems to be dead upstream
 	# (last commit in 2017)
 	"${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
+
+	# fix compatibility with recent versions of zeroconf
+	"${FILESDIR}"/${PN}-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
 )
 
 src_prepare() {

diff --git a/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch b/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
new file mode 100644
index 000000000000..79af5d94bb59
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
@@ -0,0 +1,26 @@
+From 5d8d85c649b181747d182f676cfd76f843bd61f0 Mon Sep 17 00:00:00 2001
+From: Kovid Goyal <kovid@kovidgoyal.net>
+Date: Sun, 1 Oct 2023 15:08:59 +0530
+Subject: [PATCH] Fix compatibility with zeroconf >= 0.73
+
+Fixes #2038 (fix compatibility with newer zeroconf)
+---
+ src/calibre/devices/smart_device_app/driver.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py
+index 87608f305b..b41c3a0063 100644
+--- a/src/calibre/devices/smart_device_app/driver.py
++++ b/src/calibre/devices/smart_device_app/driver.py
+@@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
+     # "monkeypatch" zeroconf with a function without the check
+     try:
+         from zeroconf._utils.name import service_type_name
++        # zeroconf 0.73 uses an lru cache so we need __wrapped__
++        service_type_name = getattr(service_type_name, '__wrapped__', service_type_name)
+         service_type_name.__kwdefaults__['strict'] = False
+     except ImportError:
+         import zeroconf
+-- 
+2.41.0
+


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2023-11-19  4:45 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2023-11-19  4:45 UTC (permalink / raw
  To: gentoo-commits

commit:     4a3c8461aeeeb326b718260b8f681411cbcba299
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Sun Nov 19 04:03:52 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 04:26:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a3c8461

app-text/calibre: add 7.0.0

- re-roll a patch that no longer cleanly applies
- the new notes feature requires a new dependency

Closes: https://bugs.gentoo.org/917541
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33899
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/calibre/Manifest                          |   2 +
 app-text/calibre/calibre-7.0.0.ebuild              | 242 +++++++++++++++++++++
 .../calibre/files/calibre-7.0.0-jxr-test.patch     |  27 +++
 3 files changed, 271 insertions(+)

diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
index 82588f0f95a8..e255cb90c96d 100644
--- a/app-text/calibre/Manifest
+++ b/app-text/calibre/Manifest
@@ -3,3 +3,5 @@ DIST calibre-5.44.0.tar.xz 41015696 BLAKE2B c7053e728da20fccfa981ed4f56e24a4d5b3
 DIST calibre-5.44.0.tar.xz.sig 566 BLAKE2B 413b95855d79bdb5b17ca5d760f834006797b4d3e413604f27d351a3392e16d647e772dc063306bf973e1156c34f68cb38152a66164bca849ebed5484e7f6065 SHA512 59957bf35a73f218241bf76cc86994d5af87cea11d3b0800e83f157bf0b2cfcaf4b6c1314562e74a1141d0c167fdb1619cb9a90e93b67f55dd55ceed77045059
 DIST calibre-6.29.0.tar.xz 41487064 BLAKE2B 55472db2f510465f32729fe2f5ccd1127f8df8d548a0141c0cbeae50cc17d836cde04c7c69228da4e81512b7438a527922a6a42149bf3b852f7fc2666ef41ec9 SHA512 32f5d03d68ba4a2f5572cab1acf68ddc46cbda83edfaba0dc0d793d950060fa54cdb85ba4f5700a56895f915ed126617f2e0b74ca200836b812ad765c9d298e8
 DIST calibre-6.29.0.tar.xz.sig 566 BLAKE2B d1ef0a7bbff1959206ab5bff2638e2c5618e342ba189e764894d964493d1e2d0fead74e27d07248251f69573c477333a734c98ec523385e2de33fce526413e0b SHA512 9c1a3408e34ef95b81e9459ce29ae99fdd44df40d438c7107df4840080c6945bdd06270fc17162ce3d04a12c84462de8fe5bc32633bd09f68d65ded761d6f199
+DIST calibre-7.0.0.tar.xz 41889020 BLAKE2B 46d6303043e3a9d1d4eaede3c6b4a850ab6cd86b5f6561d907bf3156e7f05b5f1c758e722717d21aa18b623d1eaf8691c6bc61398039eaae34efee7aa0520aa4 SHA512 1a58bdf2d482965b03a5accec6a468c40d8a2367724fd35574352d0bcb011c250aa33f072133ed3c108082d7acfa9eb9cc06215ec89b246884c3d3f7beb05a16
+DIST calibre-7.0.0.tar.xz.sig 566 BLAKE2B 72c18e259d84ea8fedc860da84de1306a0f02f13f5b80b5ed3638926a52f6746e1979bc350f4b6b3de753ff29ee6fa6cd417d2fac7f8418641e45acc17f3c826 SHA512 61ce480540911b0742fdbcf8f4f5f1093db7593858b179c03c61bd5e50dfbbd88a9d6611f2e48515885229f381f9045822df408b7e33b50b9bc65b267b6829f3

diff --git a/app-text/calibre/calibre-7.0.0.ebuild b/app-text/calibre/calibre-7.0.0.ebuild
new file mode 100644
index 000000000000..5a5be06123a3
--- /dev/null
+++ b/app-text/calibre/calibre-7.0.0.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="sqlite,ssl"
+
+inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
+
+DESCRIPTION="Ebook management application"
+HOMEPAGE="https://calibre-ebook.com/"
+SRC_URI="
+	https://download.calibre-ebook.com/${PV}/${P}.tar.xz
+	verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
+"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
+
+LICENSE="
+	GPL-3+
+	GPL-3
+	GPL-2+
+	GPL-2
+	GPL-1+
+	LGPL-3+
+	LGPL-2.1+
+	LGPL-2.1
+	BSD
+	MIT
+	Old-MIT
+	Apache-2.0
+	public-domain
+	|| ( Artistic GPL-1+ )
+	CC-BY-3.0
+	OFL-1.1
+	PSF-2
+"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE="+font-subsetting ios speech +system-mathjax test +udisks unrar"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# Qt slotted dependencies are used because the libheadless.so plugin links to
+# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
+COMMON_DEPEND="${PYTHON_DEPS}
+	app-i18n/uchardet
+	>=app-text/hunspell-1.7:=
+	>=app-text/podofo-0.10.0:=
+	app-text/poppler[utils]
+	dev-libs/hyphen:=
+	>=dev-libs/icu-57.1:=
+	dev-libs/openssl:=
+	dev-libs/snowball-stemmer:=
+	$(python_gen_cond_dep '
+		>=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
+		dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+		>=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
+		dev-python/dnspython[${PYTHON_USEDEP}]
+		>=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
+		>=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
+		>=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
+		dev-python/jeepney[${PYTHON_USEDEP}]
+		>=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
+		>=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
+		>=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
+		>=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
+		>=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
+		>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
+		>=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
+		>=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
+		>=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
+		>=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
+		dev-python/PyQt6[gui,network,opengl,printsupport,quick,svg,widgets,${PYTHON_USEDEP}]
+		dev-python/PyQt6-WebEngine[widgets,${PYTHON_USEDEP}]
+		dev-python/regex[${PYTHON_USEDEP}]
+		dev-python/xxhash[${PYTHON_USEDEP}]
+		>=dev-python/zeroconf-0.75.0[${PYTHON_USEDEP}]
+	')
+	dev-qt/qtbase:6=[gui,widgets]
+	dev-qt/qtimageformats:6
+	dev-util/desktop-file-utils
+	dev-util/gtk-update-icon-cache
+	media-fonts/liberation-fonts
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2:=
+	>=media-libs/libmtp-1.1.11:=
+	>=media-gfx/optipng-0.7.6
+	virtual/libusb:1=
+	x11-misc/shared-mime-info
+	>=x11-misc/xdg-utils-1.0.2-r2
+	font-subsetting? ( $(python_gen_cond_dep 'dev-python/fonttools[${PYTHON_USEDEP}]') )
+	ios? (
+		>=app-pda/usbmuxd-1.0.8
+		>=app-pda/libimobiledevice-1.2.0
+	)
+	speech? ( $(python_gen_cond_dep 'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
+	system-mathjax? ( >=dev-libs/mathjax-3 )
+	udisks? ( virtual/libudev )
+	unrar? ( dev-python/unrardll )
+"
+RDEPEND="${COMMON_DEPEND}
+	udisks? ( sys-fs/udisks:2 )"
+DEPEND="${COMMON_DEPEND}
+	test? ( $(python_gen_cond_dep '>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
+"
+BDEPEND="$(python_gen_cond_dep '
+		>=dev-python/PyQt-builder-1.10.3[${PYTHON_USEDEP}]
+		>=dev-python/sip-5[${PYTHON_USEDEP}]
+	')
+	virtual/pkgconfig
+	system-mathjax? ( dev-lang/rapydscript-ng )
+	verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
+"
+
+PATCHES=(
+	# Skip calling a binary (JxrDecApp) from libjxr which is used for tests
+	# We don't (yet?) package libjxr and it seems to be dead upstream
+	# (last commit in 2017)
+	"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
+)
+
+src_prepare() {
+	default
+
+	# Warning:
+	#
+	# While it might be rather tempting to add yet another sed here,
+	# please don't. There have been several bugs in Gentoo's packaging
+	# of calibre from seds-which-become-stale. Please consider
+	# creating a patch instead, but in any case, run the test suite
+	# and ensure it passes.
+	#
+	# If in doubt about a problem, checking Fedora's packaging is recommended.
+
+	# Disable unnecessary privilege dropping for bug #287067.
+	sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
+		-i setup/install.py || die "sed failed to patch install.py"
+
+	# This is only ever used at build time. It contains a small embedded copy
+	# of the rapydscript-ng compiler usable inside of qtwebengine, if you don't
+	# have rapydscript-ng (a nodejs package) itself installed. Its only purpose
+	# is to build some resources that come bundled in dist tarballs already...
+	# and which we may also need to regenerate e.g. to use system-mathjax.
+	#
+	# However, running qtwebengine violates the portage sandbox (among other
+	# things, it tries to create directories in /usr! amazing) so this is a
+	# wash anyway. The only real solution here is to package rapydscript-ng.
+	#
+	# We do not need it at build time, and *no one* needs it at install time.
+	# Delete the cruft.
+	rm -r resources/rapydscript/ || die
+}
+
+src_compile() {
+	# TODO: get qmake called by setup.py to respect CC and CXX too
+	tc-export CC CXX
+
+	# bug 821871
+	local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
+	export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" PODOFO_LIB_DIR="${MY_LIBDIR}"
+	export QMAKE="$(qt6_get_bindir)/qmake"
+
+	edo ${EPYTHON} setup.py build
+	edo ${EPYTHON} setup.py gui
+
+	# A few different resources are bundled in the distfile by default, because
+	# not all systems necessarily have them. We un-vendor them, using the
+	# upstream integrated approach if possible. See setup/revendor.py and
+	# consider migrating other resources to this if they do not use it, in
+	# *preference* over manual rm'ing.
+	edo ${EPYTHON} setup.py liberation_fonts \
+		--path-to-liberation_fonts "${EPREFIX}"/usr/share/fonts/liberation-fonts \
+		--system-liberation_fonts
+	if use system-mathjax; then
+		edo ${EPYTHON} setup.py mathjax --path-to-mathjax "${EPREFIX}"/usr/share/mathjax --system-mathjax
+		edo ${EPYTHON} setup.py rapydscript
+	fi
+}
+
+src_test() {
+	# Skipped tests:
+	local _test_excludes=(
+		# unpackaged Python dependency: py7zr
+		7z
+		# unpackaged Python dependency: pyzstd
+		test_zstd
+		# tests if a completely unused module is bundled
+		pycryptodome
+
+		$(usev !speech speech_dispatcher)
+		$(usev !unrar test_unrar)
+
+		# undocumented reasons
+		test_mem_leaks
+		test_searching
+	)
+
+	edo ${PYTHON} setup.py test "${_test_excludes[@]/#/--exclude-test-name=}"
+}
+
+src_install() {
+	# Bug #352625 - Some LANGUAGE values can trigger the following ValueError:
+	#   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
+	#    return _parse_localename(localename)
+	#  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
+	#    raise ValueError, 'unknown locale: %s' % localename
+	#ValueError: unknown locale: 46
+	export -n LANG LANGUAGE ${!LC_*}
+	export LC_ALL=C.utf8 # bug #709682
+
+	# Bug #295672 - Avoid sandbox violation in ~/.config by forcing
+	# variables to point to our fake temporary $HOME.
+	export HOME="${T}/fake_homedir"
+	export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
+	mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
+
+	addpredict /dev/dri #665310
+
+	# If this directory doesn't exist, zsh completion won't install
+	dodir /usr/share/zsh/site-functions
+
+	edo "${PYTHON}" setup.py install \
+		--staging-root="${ED}/usr" \
+		--prefix="${EPREFIX}/usr" \
+		--libdir="${EPREFIX}/usr/$(get_libdir)" \
+		--staging-libdir="${ED}/usr/$(get_libdir)" \
+		--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
+
+	cp -r man-pages/ "${ED}"/usr/share/man || die
+
+	find "${ED}"/usr/share -type d -empty -delete || die
+
+	python_fix_shebang "${ED}/usr/bin"
+
+	python_optimize "${ED}"/usr/$(get_libdir)/calibre "${D}/$(python_get_sitedir)"
+
+	newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
+	newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
+}

diff --git a/app-text/calibre/files/calibre-7.0.0-jxr-test.patch b/app-text/calibre/files/calibre-7.0.0-jxr-test.patch
new file mode 100644
index 000000000000..c37d0cdfe028
--- /dev/null
+++ b/app-text/calibre/files/calibre-7.0.0-jxr-test.patch
@@ -0,0 +1,27 @@
+diff --git a/src/calibre/utils/img.py b/src/calibre/utils/img.py
+index b61627b63e..ff51c76e75 100644
+--- a/src/calibre/utils/img.py
++++ b/src/calibre/utils/img.py
+@@ -129,8 +129,6 @@ def image_from_data(data):
+     i = QImage()
+     if not i.loadFromData(data):
+         q = what(None, data)
+-        if q == 'jxr':
+-            return load_jxr_data(data)
+         raise NotImage(f'Not a valid image (detected type: {q})')
+     return i
+ 
+@@ -693,13 +691,6 @@ def test():  # {{{
+     despeckle_image(img)
+     remove_borders_from_image(img)
+     image_to_data(img, fmt='GIF')
+-    p = subprocess.Popen([get_exe_path('JxrDecApp'), '-h'],
+-                           creationflags=subprocess.DETACHED_PROCESS if iswindows else 0,
+-                           stdout=subprocess.PIPE)
+-    raw, _ = p.communicate()
+-    p.wait()
+-    if b'JPEG XR Decoder Utility' not in raw:
+-        raise SystemExit('Failed to run JxrDecApp')
+ # }}}
+ 
+ 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/
@ 2024-11-10 21:29 Eli Schwartz
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Schwartz @ 2024-11-10 21:29 UTC (permalink / raw
  To: gentoo-commits

commit:     4ddb78d1ccd58984d9f01154a20cf5ab3be4233f
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 10 21:28:19 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 21:29:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ddb78d1

app-text/calibre: backport patch to fix tests with pillow 11

Apply the fix to stable in addition to packaging the new version.

Bug: https://bugs.gentoo.org/943009
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 app-text/calibre/calibre-7.19.0.ebuild             |  2 ++
 app-text/calibre/calibre-7.20.0.ebuild             |  2 ++
 ...PIL-11.0-changes-its-webp-features-output.patch | 36 ++++++++++++++++++++++
 3 files changed, 40 insertions(+)

diff --git a/app-text/calibre/calibre-7.19.0.ebuild b/app-text/calibre/calibre-7.19.0.ebuild
index 7dc060197e38..184ae72b4dc1 100644
--- a/app-text/calibre/calibre-7.19.0.ebuild
+++ b/app-text/calibre/calibre-7.19.0.ebuild
@@ -124,6 +124,8 @@ PATCHES=(
 	# We don't (yet?) package libjxr and it seems to be dead upstream
 	# (last commit in 2017)
 	"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
+	# fix tests with pillow 11
+	"${FILESDIR}"/0001-PIL-11.0-changes-its-webp-features-output.patch
 )
 
 src_prepare() {

diff --git a/app-text/calibre/calibre-7.20.0.ebuild b/app-text/calibre/calibre-7.20.0.ebuild
index de5d2fa83dcf..44412dec9bce 100644
--- a/app-text/calibre/calibre-7.20.0.ebuild
+++ b/app-text/calibre/calibre-7.20.0.ebuild
@@ -125,6 +125,8 @@ PATCHES=(
 	# We don't (yet?) package libjxr and it seems to be dead upstream
 	# (last commit in 2017)
 	"${FILESDIR}/${PN}-7.0.0-jxr-test.patch"
+	# fix tests with pillow 11
+	"${FILESDIR}"/0001-PIL-11.0-changes-its-webp-features-output.patch
 )
 
 src_prepare() {

diff --git a/app-text/calibre/files/0001-PIL-11.0-changes-its-webp-features-output.patch b/app-text/calibre/files/0001-PIL-11.0-changes-its-webp-features-output.patch
new file mode 100644
index 000000000000..61d00913dd33
--- /dev/null
+++ b/app-text/calibre/files/0001-PIL-11.0-changes-its-webp-features-output.patch
@@ -0,0 +1,36 @@
+From a961ddbfcb96461fd830ccd6facb81d69cc679d8 Mon Sep 17 00:00:00 2001
+From: Kovid Goyal <kovid@kovidgoyal.net>
+Date: Tue, 29 Oct 2024 06:08:04 +0530
+Subject: [PATCH] PIL 11.0 changes its webp features output
+
+---
+ src/calibre/test_build.py | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index 4e3d740705..91c32eba38 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -436,16 +436,14 @@ def test_imaging(self):
+         out = StringIO()
+         features.pilinfo(out=out, supported_formats=False)
+         out = out.getvalue()
+-        for line in '''\
++        lines = '''\
+         --- PIL CORE support ok
+         --- FREETYPE2 support ok
+         --- WEBP support ok
+-        --- WEBP Transparency support ok
+-        --- WEBPMUX support ok
+-        --- WEBP Animation support ok
+         --- JPEG support ok
+         --- ZLIB (PNG/ZIP) support ok
+-        '''.splitlines():
++        '''.splitlines()
++        for line in lines:
+             self.assertIn(line.strip(), out)
+         with Image.open(I('lt.png', allow_user_override=False)) as i:
+             self.assertGreaterEqual(i.size, (20, 20))
+-- 
+2.45.2
+


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-11-10 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-21  4:11 [gentoo-commits] repo/gentoo:master commit in: app-text/calibre/, app-text/calibre/files/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2024-11-10 21:29 Eli Schwartz
2023-11-19  4:45 Zac Medico
2023-10-18  4:26 Zac Medico
2020-02-09 20:50 Zac Medico
2015-11-10 13:50 Justin Lecher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox