summaryrefslogtreecommitdiff
path: root/app-text/calibre
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-08 21:45:04 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-08 21:45:04 +0000
commit65737cf14a7220bd9a487aa2af4ae0e79bd23e86 (patch)
tree625754b14ae80ac167d1b150c2314b647cd008e6 /app-text/calibre
parent5001a6c7b6da2956f5b17c695b1e0059dc7b8de5 (diff)
gentoo resync : 08.01.2018
Diffstat (limited to 'app-text/calibre')
-rw-r--r--app-text/calibre/Manifest8
-rw-r--r--app-text/calibre/calibre-2.78.0.ebuild29
-rw-r--r--app-text/calibre/calibre-3.15.0.ebuild24
-rw-r--r--app-text/calibre/calibre-3.3.0.ebuild276
-rw-r--r--app-text/calibre/calibre-3.8.0.ebuild26
5 files changed, 65 insertions, 298 deletions
diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
index ea226e5d5341..c6dbc3b3aa32 100644
--- a/app-text/calibre/Manifest
+++ b/app-text/calibre/Manifest
@@ -7,10 +7,8 @@ AUX calibre-server.conf 523 BLAKE2B a9fb65a327656f9b2f54eab27dcaf2cdfbcbe5f0d637
AUX calibre-server.init 1811 BLAKE2B fe22257128896d4299c5d5edab6ac63cdcf79da483f4afc49b0d1649b17599389dd4b9f88c35a964e289cbe6d961136f1e5760a2244137c404e573510899bd60 SHA512 760aa7a8f51b23b116ba07749855737869ff2313f0528d67e5a46bc362e5c0a04a7e1f46c32dd6e82add4fa5dc41d397db32dbd1a09c912008e0890d1a133eeb
DIST calibre-2.78.0.tar.xz 38739404 BLAKE2B a563883407b8c5cdbc8080ef94d7325eca76f938d0238d0ffd7a6836453a6aa1f5dc06a602eb255cfe99e083734f352bc1e18e6ab1834dd6e003b357ca03b42e SHA512 0779ac385dde45ac4baee7cecb0916e245f3e1cf20662bad9d9a4278265390b1aa89c2b478601b57113e7de08a69343288488ee299e8b43332f0129e650aa0ca
DIST calibre-3.15.0.tar.xz 38177684 BLAKE2B 7d3892f81db61f8d4a08589a42ccd71183d9dc7fa401480d4426d1205a9a633216a79865140481f63e1e3a741d34f604ea9d7f98c490949d0d4452cb9123fb9b SHA512 93a9f3b7122d8f4cd1d847727f6d1ccd1f9d828651e9ee77a34544742884b3e925552ca61ec1d0a1196b04a0874e97fc877e679dd8a69ba8b754b7688b730697
-DIST calibre-3.3.0.tar.xz 36308116 BLAKE2B fe331df77ed256fb509028e777bd628cb7b316ae99d594c7335216c08e509de32df03ebe3c1393e2cdf6618b4a3820458d2bf9045380c43f979218544cb7757d SHA512 bb63f83d5e35079daba9ec6e7849e6a65c51cf0b2da9fc45b86a2b64cc147f862f08413730f3d2710793de7b045fc73913534dfca11b128ad0ea72e92033f977
DIST calibre-3.8.0.tar.xz 37922608 BLAKE2B 6ae465da15a50f45621753b4f8fdcb978fa3b3cf170575cca0a9e4ae3cd324fbb4b194861180961539f8057ce3650066d7113368dee404d899ed8ca1a58f80e6 SHA512 db7ff5cb0ee82b3237090cbf6a13d13bfa5e27139dd067290ed59d407d2dbbae2ecd3dab338a0beed845079387a051b092233350091ef6ec82623d3a16b1d48d
-EBUILD calibre-2.78.0.ebuild 8033 BLAKE2B aa37993a33ea21f966b27673b972187c6fc0270ccd8db61af32114e7fe99cb39386399e55be7960196c2c419f87bb987a3f4e9ed335cdf5a4fcc8b6848f93c87 SHA512 c65f281218b26c1f77c6e226ab86bce7dab3089c99e5a8be39b52cf6f77c643520cfb5a1026d303a09964044bfe6c9ff2f5dc1fef1a625a61354a9d950d43487
-EBUILD calibre-3.15.0.ebuild 8880 BLAKE2B 13ea9ab57da2e5fce9e71707dc8711b6a95c642a12929e7144050f3b3aad01304fb9b00bfff6dac410dfb46cb4da47fb0cd94afcf3cd9b418fe130c2c54453d1 SHA512 6dace15dc9be284ad89113c8c6b9387b6bf30a4c3e2500dfc635c921d3a3d4cf8213e5731989bdb18fa2b8c7b1bff07c889f220cd799f07b076c7ebef85ac415
-EBUILD calibre-3.3.0.ebuild 8800 BLAKE2B be17c2dfa92c94084805d2c8dd736f8f8369b79bf2af8b78ce5a0cc0288162f97856a0c792e441b94635eb22ea4493785db72d02ce337beaecab199aafaa9833 SHA512 581cb6b0331a058b013cf32de5b7d87b7ddf35482f91c62dbb947d392c90d46cf58690780534a1bb2c243dca2cee1b015b0ef361ed9763fe3cddd20ef2faafb8
-EBUILD calibre-3.8.0.ebuild 8843 BLAKE2B 5bc3d0722e890fed9a95292f8fe6e27dcc5d502a4850335bf221f1cd6a9c6ec0c703819a199d79b0ab01b72ffbd0134d48b4435a6ed30c91272843b0b4a5193a SHA512 41a12022df5a61a6b7308a65c34cb04eb25187d6da72691bfe6d60f39b7fe6e33ce48fe4fd03d576193df41e246bfc61c0086266f1584093739a0709602b949a
+EBUILD calibre-2.78.0.ebuild 8460 BLAKE2B e32c092ef390d34c3b277363ce65c58f546d1f3e9cab484a24d3cbb6278e80d7fb5c398fd39f82c697743f48b2b1ad663c3f92d4521b8bbaaa2df60c31da11dd SHA512 4b8c53480d7d3c26c8b63c0c127624de6869b24786c04ac37cf9aa5b61460a90636cfcf7115d018750bbacef2a4ea8c725804b2458b2c92095eed31be58e788a
+EBUILD calibre-3.15.0.ebuild 9288 BLAKE2B 1bab29936ccb88344000c7fa443b6a903593c2bc3502f0a771b1b0e8f91464c4c6072a50aca328312babfa7d7a2b978577fe03b797e5771e58ebfc8d21fcec0d SHA512 d62e341100904bf95324210db5b6890c23ab13b0960188de50f611b3fd515f148d9744504925ed1244def801b8e8dc23d7738bb9c4fd53939ea2942671d2961d
+EBUILD calibre-3.8.0.ebuild 9251 BLAKE2B 4fa3716b67c82a6d874b6aba0ad657dcd7ba9f3c4833204c8d9466b828ca847010240d04cc3e3343131b9952427e9bce96c739162e9fa4921127b18f57abe1bd SHA512 da3a7fabc0cec91cc431484a014f31b25303c369e26bf5c9a65bc4bb444ede18922e004b27296d9813797340a8a17a824d00c84d8c9581eecbdc116d23769844
MISC metadata.xml 382 BLAKE2B 87fa7e63a6ed7a4ea55247b362288b43f7edd312cc3085bb8c1b947402ae4aa0df01fac4f6646d260653ff8af7fe28d3dabb8a213dbf3e206181b69835b33d5f SHA512 8503e0a4a48d93682c386eb1d6507b4b26585afc9d62b7cd52bc00b457a887bd17422a03669ff404570ff7f5ff6f0bba14ee935979f8b54722870d6620097de5
diff --git a/app-text/calibre/calibre-2.78.0.ebuild b/app-text/calibre/calibre-2.78.0.ebuild
index b2d45db79e7c..4925b5e794f0 100644
--- a/app-text/calibre/calibre-2.78.0.ebuild
+++ b/app-text/calibre/calibre-2.78.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -6,7 +6,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="sqlite,ssl"
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
+inherit eutils bash-completion-r1 gnome2-utils multilib toolchain-funcs python-single-r1 xdg-utils
DESCRIPTION="Ebook management application"
HOMEPAGE="http://calibre-ebook.com/"
@@ -60,6 +60,8 @@ COMMON_DEPEND="${PYTHON_DEPS}
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
+ dev-util/desktop-file-utils
+ dev-util/gtk-update-icon-cache
media-fonts/liberation-fonts
>=media-gfx/imagemagick-6.5.9[jpeg,png]
media-libs/fontconfig
@@ -72,6 +74,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
x11-libs/libX11
x11-libs/libXext
x11-libs/libXrender
+ x11-misc/shared-mime-info
>=x11-misc/xdg-utils-1.0.2-r2
udisks? ( virtual/libudev )"
RDEPEND="${COMMON_DEPEND}
@@ -81,6 +84,14 @@ DEPEND="${COMMON_DEPEND}
>=virtual/podofo-build-0.8.2
virtual/pkgconfig"
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary && $(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() {
# 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
@@ -240,12 +251,18 @@ src_install() {
}
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
pkg_postinst() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}
pkg_postrm() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}
diff --git a/app-text/calibre/calibre-3.15.0.ebuild b/app-text/calibre/calibre-3.15.0.ebuild
index ec7d26d14536..685494d3112a 100644
--- a/app-text/calibre/calibre-3.15.0.ebuild
+++ b/app-text/calibre/calibre-3.15.0.ebuild
@@ -6,7 +6,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="sqlite,ssl"
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
+inherit eutils bash-completion-r1 gnome2-utils multilib toolchain-funcs python-single-r1 xdg-utils
DESCRIPTION="Ebook management application"
HOMEPAGE="http://calibre-ebook.com/"
@@ -68,6 +68,8 @@ COMMON_DEPEND="${PYTHON_DEPS}
dev-qt/qtdbus:5=
dev-qt/qtgui:5=
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:=
@@ -81,6 +83,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
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
@@ -94,6 +97,14 @@ DEPEND="${COMMON_DEPEND}
>=virtual/podofo-build-0.9.4
virtual/pkgconfig"
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary && $(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() {
# 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
@@ -253,6 +264,7 @@ src_install() {
}
pkg_preinst() {
+ gnome2_icon_savelist
# Indentify stray directories from upstream's "Binary install"
# method (see bug 622728).
CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
@@ -269,11 +281,13 @@ pkg_postinst() {
rm -rf "${x}"
fi
done
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}
pkg_postrm() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}
diff --git a/app-text/calibre/calibre-3.3.0.ebuild b/app-text/calibre/calibre-3.3.0.ebuild
deleted file mode 100644
index 46710a8a8454..000000000000
--- a/app-text/calibre/calibre-3.3.0.ebuild
+++ /dev/null
@@ -1,276 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="sqlite,ssl"
-
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
-
-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="ios +udisks"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-COMMON_DEPEND="${PYTHON_DEPS}
- >=app-text/podofo-0.8.2:=
- >=app-text/poppler-0.26.5[qt5]
- >=dev-libs/chmlib-0.40:=
- dev-libs/glib:2
- >=dev-libs/icu-57.1:=
- >=dev-python/apsw-3.13.0[${PYTHON_USEDEP}]
- >=dev-python/beautifulsoup-3.0.5:python-2[${PYTHON_USEDEP}]
- dev-python/chardet[${PYTHON_USEDEP}]
- >=dev-python/cssselect-0.7.1[${PYTHON_USEDEP}]
- >=dev-python/cssutils-1.0.1[${PYTHON_USEDEP}]
- >=dev-python/dbus-python-1.2.4[${PYTHON_USEDEP}]
- >=dev-libs/dbus-glib-0.106
- >=sys-apps/dbus-1.10.8
- >=dev-python/lxml-3.2.1[${PYTHON_USEDEP}]
- >=dev-python/mechanize-0.2.5[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]
- dev-python/netifaces[${PYTHON_USEDEP}]
- dev-python/pillow[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- >=dev-python/pygments-2.1.3[${PYTHON_USEDEP}]
- >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
- >=dev-python/PyQt5-5.8[gui,svg,webkit,widgets,network,printsupport,${PYTHON_USEDEP}]
- dev-python/regex[${PYTHON_USEDEP}]
- 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.11:=
- >=media-libs/libwmf-0.2.8
- >=media-gfx/optipng-0.7.6
- sys-libs/zlib
- virtual/libusb:1=
- virtual/python-dnspython[${PYTHON_USEDEP}]
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXrender
- >=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 sys-fs/udisks:0 ) )"
-DEPEND="${COMMON_DEPEND}
- >=dev-python/setuptools-23.1.0[${PYTHON_USEDEP}]
- >=virtual/podofo-build-0.9.4
- virtual/pkgconfig"
-
-src_prepare() {
- # 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
- eapply \
- "${FILESDIR}/${PN}-2.9.0-no_updates_dialog.patch" \
- "${FILESDIR}/${PN}-disable_plugins.patch"
-
- eapply_user
-
- # 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 "/^ self.check_call(\\[QMAKE\\] + qmc + \\[proname\\])$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', 'Makefile'])" \
- -i setup/build.py || die "sed failed to patch build.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'
-
- # don't create/install uninstaller
- sed '/self\.create_uninstaller()/d' -i src/calibre/linux.py || die
-}
-
-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} || die
- chmod +x "${T}"/{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 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}" || 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"
-
- # 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
- #dodir $(python_get_sitedir)
- PATH=${T}:${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
-
- # 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 ${EPREFIX}usr/share/fonts/liberation-fonts/${x} ]] || continue
- ln -sf "../../../fonts/liberation-fonts/${x}" "${x}" || die
- done
-
- einfo "Converting python shebangs"
- python_fix_shebang "${ED}"
-
- einfo "Compiling python modules"
- python_optimize "${ED}"usr/lib/calibre
-
- newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
- newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
-
- bashcomp_alias calibre \
- lrfviewer \
- calibre-debug \
- ebook-meta \
- calibre-server \
- ebook-viewer \
- ebook-polish \
- fetch-ebook-metadata \
- lrf2lrs \
- ebook-convert \
- ebook-edit \
- calibre-smtp \
- ebook-device
-
-}
-
-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
- 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-3.8.0.ebuild b/app-text/calibre/calibre-3.8.0.ebuild
index e18eb11846bc..9c035ba93869 100644
--- a/app-text/calibre/calibre-3.8.0.ebuild
+++ b/app-text/calibre/calibre-3.8.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -6,7 +6,7 @@ EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="sqlite,ssl"
-inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs python-single-r1
+inherit eutils bash-completion-r1 gnome2-utils multilib toolchain-funcs python-single-r1 xdg-utils
DESCRIPTION="Ebook management application"
HOMEPAGE="http://calibre-ebook.com/"
@@ -66,6 +66,8 @@ COMMON_DEPEND="${PYTHON_DEPS}
dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
+ dev-util/desktop-file-utils
+ dev-util/gtk-update-icon-cache
media-fonts/liberation-fonts
>=media-gfx/imagemagick-6.5.9[jpeg,png]
media-libs/fontconfig
@@ -79,6 +81,7 @@ COMMON_DEPEND="${PYTHON_DEPS}
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
@@ -92,6 +95,14 @@ DEPEND="${COMMON_DEPEND}
>=virtual/podofo-build-0.9.4
virtual/pkgconfig"
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary && $(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() {
# 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
@@ -251,6 +262,7 @@ src_install() {
}
pkg_preinst() {
+ gnome2_icon_savelist
# Indentify stray directories from upstream's "Binary install"
# method (see bug 622728).
CALIBRE_LIB_DIR=/usr/$(get_libdir)/calibre
@@ -267,11 +279,13 @@ pkg_postinst() {
rm -rf "${x}"
fi
done
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}
pkg_postrm() {
- fdo-mime_desktop_database_update
- fdo-mime_mime_database_update
+ xdg_desktop_database_update
+ xdg_mimeinfo_database_update
+ gnome2_icon_cache_update
}