From b97220a0c5f26fe0ff4a255bd80c0a63aa424c63 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 12 May 2013 21:43:18 +0000 Subject: 0.9.30 version bump. Package-Manager: portage-2.2.0_alpha174/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3 --- app-text/calibre/ChangeLog | 8 +- app-text/calibre/Manifest | 12 +-- app-text/calibre/calibre-0.9.28.ebuild | 190 --------------------------------- app-text/calibre/calibre-0.9.30.ebuild | 190 +++++++++++++++++++++++++++++++++ 4 files changed, 203 insertions(+), 197 deletions(-) delete mode 100644 app-text/calibre/calibre-0.9.28.ebuild create mode 100644 app-text/calibre/calibre-0.9.30.ebuild (limited to 'app-text/calibre') diff --git a/app-text/calibre/ChangeLog b/app-text/calibre/ChangeLog index 74fb1cce4b88..322553a9decf 100644 --- a/app-text/calibre/ChangeLog +++ b/app-text/calibre/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/calibre # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.276 2013/05/05 02:13:32 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.277 2013/05/12 21:43:15 zmedico Exp $ + +*calibre-0.9.30 (12 May 2013) + + 12 May 2013; Zac Medico +calibre-0.9.30.ebuild, + -calibre-0.9.28.ebuild: + 0.9.30 version bump. 05 May 2013; Zac Medico calibre-0.9.27.ebuild: Migrate off of python.eclass. diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest index bf2abfd15743..de350af6932e 100644 --- a/app-text/calibre/Manifest +++ b/app-text/calibre/Manifest @@ -6,17 +6,17 @@ AUX calibre-no_updates_dialog.patch 891 SHA256 59cbef4d8026241bd198f36728c4dfde6 AUX calibre-server.conf 523 SHA256 55b20e6a208f7eb7128e0f8e0f8ead83a55ef80bcb62737d1658074141a5b213 SHA512 4595786d9b6ed7662a1124e8acc32e03e0149f614a07890f9df08d05811a1b8de51cc33cc1bfbf30b072c7ad75dc3b8247e9de53d20ee2b45017cb4160437058 WHIRLPOOL a4ba22fb5a9893c2db6254e2ee569514dd132284e0f4e8b62561ec3def773c917d17d6718975b1ecbd02197cb3330506e48b6dd656c20cfacfd610a680e34db1 AUX calibre-server.init 1928 SHA256 d5632da5955d1304a0b750850b8933eb053ee3462d0a9f74c941a45d8b65707b SHA512 c51c7cae899bebe7fb339f9cfd4070caa778f86ce997dce26052e158dac12444d3a72db91fd83528ccad07d9bd9a9e72edca9ba91d1805e91c91a0a6ed32f579 WHIRLPOOL cf91dc9993b0329821a9a7b9b4a5245c8ef7a6a2a407cddae4b7b94aff1698e663e9ba08352b61b48fe34a1e3c83701ac71ac549142fd12795e1828d5d8f779d DIST calibre-0.9.27.tar.xz 28696180 SHA256 8fd3779c8f878420333f6919f80493bf69d4b64bf427697ebc365497d2450d1f SHA512 91970f7c7349f661fc582eb43b89b81e77350b1cf2237c78e55c9f028a94b803b5d72bdac3ac11722c4fcf93077c1f8042567f8e380ad03423ba6c7f5dec7318 WHIRLPOOL 2313f94ee2417343693e1b48736434d1bf356795eb781abbaf68b858ba9fd57eb2a78e8afe04b9c992a1879a99eb9cf65527ccea7ed1a91d7554a62dcee7822b -DIST calibre-0.9.28.tar.xz 28746916 SHA256 25fcc71a394f42ed701f215249f4b17b940c8fcf0a51f480c14f0fc3c7ff31f2 SHA512 eb237c9a96ddb53a567bb59bdd37f803c1d21b96517fea7c8f14fb02df107a17fca471375183c83602866750ace644c95816a04e3b29aa9d43c4470ef2128838 WHIRLPOOL 668a2106e8a7fa366161ec9a36d8d859842b2e31aee517f82b8bb6cf5820db21371f79fd8cd8d153c7673be1859e61909758cd020273343a1fa197b229b354dd DIST calibre-0.9.29.tar.xz 28819456 SHA256 29a789108772665000e895d0798b758068a4143807213de68fdd39aa85059058 SHA512 30a551a5108332741c80454264fa00fc1f332ccb9cd3c75b1c48253f027d84e4407e9e223325b0a0c36fc78ab1cd26b5dc02f7bb4d5dce486796bf3921b0252c WHIRLPOOL 349a4df78d3ad072b18133f398e72445fa74544e945a9d0e0cf3f4960c694d9d3ebd89cf43569d1020e319f1b4286858ad720cd8aaa5e79b1c12b907665ad5f6 +DIST calibre-0.9.30.tar.xz 28894864 SHA256 eab88d0d5ade70dd1bae9522f444ddd3ab71b2d57a159d6ecc6276cd674fc927 SHA512 330a1bdd7b43f6aea06d6a6e056c63991a3c763c2ccbf0fd70adedf2c943813872f9997340455442c8bb0d36fbeae9554a86d131dded662f57fc138ae8c5c231 WHIRLPOOL 1ea65422bb9b4e628ceb847c331148d22f323d82431e2bdee8cfa7f18d8068a6436e54140faeb6f4596ed1a6645d193d983ca2bc4938b5bb4fddc3c0a38fe025 EBUILD calibre-0.9.27.ebuild 6628 SHA256 bc4bd901a49da8e5a91424abee5fdc792a89d1b2ec73f557cab21d48e48cfa63 SHA512 62dd9854cdc07286476f260ff07f307481c30ce24b24040b0fd3d80082a7d55bf8bd97abaf774483fc3334d1989f4b8348cf0702cae767ba910d5fcdcd231ad7 WHIRLPOOL ae694e4cebdce94ccf2748b2bf59feffdab8a256b8de818b22b28e632f801f49a5b2966189b6b9c58c3178fab9b5d1c5abfcbe610b2d475507f89893410d5b28 -EBUILD calibre-0.9.28.ebuild 6630 SHA256 c130e42fe48c1ae72ea6e634fbaeb27fda45bcbe11d9e6f174f7446bea8760d2 SHA512 e0140d0b2e505c8a777fb539de1767a924290708dc1658b2f54b35e0f4cdd9b6cde1ca17c200dfb0131ef3357b20dedd2d625e8882fc0081672eb721b410fb99 WHIRLPOOL 7bd689d790ad6380c0677252ec3d45f221810513f756cad977b0b48f6b48b5358aa5c35a47e15031bf52792f13589d7bab2c50884bb0686c85d39ae7e012e397 EBUILD calibre-0.9.29.ebuild 6630 SHA256 c7cf0eda432ca18b3a764e3b9d2ac351af776369c68def95d44c8f0b0861a5d8 SHA512 dc110d750184157baa78538ae09cf3c7f78c209fdf29e49488d2b4c64959702e96f173b7c88f3e167d3905949248f1c62efdcddb237b246196f52f3f0e0bc5f7 WHIRLPOOL d419c170e243c89713b66fe7baf4947da9f3f73e2a3d6edd96839f7e5d810ea2ac7ea0e3a2e30c164fa80f3b16ff2bad855e045242ed0b5edbc48a2d19a4cf40 -MISC ChangeLog 43909 SHA256 1e5ba9176b2872884ac8455a3aef045c72d15d608230f438ad20257a5ee24340 SHA512 de2d9228f2628788734736ddaefffff2bd629bb313d152842fab6a2d92c2eea2eb576edfac44ae42770ffd87a09bd55bdd605a86d5081a48ab6ccd253d73dc38 WHIRLPOOL d1fa814021fa39bbd8884bbcc44a619517c5ee95c8dca0904e7358061f480ce5c44ec383213a221d445291e9e6048d627bae0ee76f1e74efdf262b21fa504cd2 +EBUILD calibre-0.9.30.ebuild 6630 SHA256 f0986d2bf7b3e31572c6b6ab898e9416f475534d8d7773420bbc0761b08b7caf SHA512 e25a3b475ba1c783ec37de7d5371fda7ca5f33c707325b7017045fe555a231fa2a4d46a0fa5b8e607c0b29003abb8cbd98daf20814a76a33a355c275427dd0e3 WHIRLPOOL 82ad36a6f09b0c2e3d2c21a7869f2af5411ba5203c382ed64ce07fb3bd205d5ebb81b65b525e6693f02963bcb1771547eeb971cfc57df807cf24e0d1f9b94519 +MISC ChangeLog 44061 SHA256 5bcb1f35a42be936e2018df433d06ef4b18e21dc5a425abe8b490f3d76addc67 SHA512 e8e281d1c48f65b257815b5423f85ce74332f58b1dfb1854b8c494cd7fa309ffa670204e71ce89043644de4c40ed98663caff9ca227a25f3ba6ed643e5131b73 WHIRLPOOL 1de56c8d313dedfbe1f3fd9118b0a674980df5c352c1f35276678d4ea18b56dc7c7d7667d6dbe5f4a750840c32f66251255da856f8a5ebd7b91d9224a289fa17 MISC metadata.xml 340 SHA256 db5a0163e41af3aa60492fbffbbd971e2ca9d76097d5da9d3aabf3c16e4294b9 SHA512 9cc44065f152a92ed8428da1306dc08ed3222cc84e38c0390480e1fed4f7748ff66fed8456ab25004b406fe019a29b5cab9b4bce5bcd4a934a4390b984a08333 WHIRLPOOL 928948af880ac651243ac947837b22c98528b779e6251aa26e72b4ca6e16bc05caccbae5c665e2ae7dedcecc2f5dd28d05b1f0b598f6e0750c85eedc95aac04c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) -iEYEAREIAAYFAlGFwE4ACgkQ/ejvha5XGaPuHACfey/nauCDqIMBUoOY2s6ZqB7D -MdYAn1osX4mN/3m9GHLAEWvg81dzvZh5 -=Z9Tl +iEYEAREIAAYFAlGQDPYACgkQ/ejvha5XGaNytgCg4ag0A58YhG+UYXlUJJTiFaPg +YxEAoJJWZhO0ttbMuXmRa7r4niNKnL99 +=k+qW -----END PGP SIGNATURE----- diff --git a/app-text/calibre/calibre-0.9.28.ebuild b/app-text/calibre/calibre-0.9.28.ebuild deleted file mode 100644 index 1e9748368aa0..000000000000 --- a/app-text/calibre/calibre-0.9.28.ebuild +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.9.28.ebuild,v 1.1 2013/04/27 23:04:28 zmedico Exp $ - -EAPI=5 - -inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs - -DESCRIPTION="Ebook management application." -HOMEPAGE="http://calibre-ebook.com/" -SRC_URI="http://sourceforge.net/projects/calibre/files/${PV}/${P}.tar.xz" - -LICENSE="GPL-2" - -KEYWORDS="~amd64 ~x86" - -SLOT="0" - -IUSE="+udisks" - -COMMON_DEPEND=" - >=app-text/podofo-0.8.2:= - >=app-text/poppler-0.12.3-r3:=[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/beautifulsoup-3.0.5:python-2 - dev-python/netifaces - dev-python/python-dateutil - >=dev-python/dnspython-1.6.0 - >=dev-python/cssselect-0.7.1 - >=dev-python/cssutils-0.9.9 - >=dev-python/dbus-python-0.82.2 - >=dev-python/imaging-1.1.6 - >=dev-python/lxml-2.2.1 - >=dev-python/mechanize-0.1.11 - >=dev-python/python-dateutil-1.4.1 - >=dev-python/PyQt4-4.9.1[X,svg,webkit] - 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.4:= - virtual/libusb:1= - dev-qt/qtdbus:4= - dev-qt/qtsvg:4= - >=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" - -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" - - # 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}-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} - 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 calibre-mount-helper - export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" - local libdir=$(get_libdir) - [[ -n $libdir ]] || die "get_libdir returned an empty string" - - 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" - - # Remove dummy calibre-mount-helper which is unused since calibre-0.8.25 - # due to bug #389515 (instead, calibre now calls udisks via dbus). - rm "${ED}usr/bin/calibre-mount-helper" || 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" - - dobashcomp "${ED}"usr/etc/bash_completion.d/calibre - rm -r "${ED}"usr/etc/bash_completion.d - find "${ED}"usr/etc -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-0.9.30.ebuild b/app-text/calibre/calibre-0.9.30.ebuild new file mode 100644 index 000000000000..4a424f9098f6 --- /dev/null +++ b/app-text/calibre/calibre-0.9.30.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/calibre-0.9.30.ebuild,v 1.1 2013/05/12 21:43:15 zmedico Exp $ + +EAPI=5 + +inherit eutils fdo-mime bash-completion-r1 multilib toolchain-funcs + +DESCRIPTION="Ebook management application." +HOMEPAGE="http://calibre-ebook.com/" +SRC_URI="http://sourceforge.net/projects/calibre/files/${PV}/${P}.tar.xz" + +LICENSE="GPL-2" + +KEYWORDS="~amd64 ~x86" + +SLOT="0" + +IUSE="+udisks" + +COMMON_DEPEND=" + >=app-text/podofo-0.8.2:= + >=app-text/poppler-0.12.3-r3:=[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/beautifulsoup-3.0.5:python-2 + dev-python/netifaces + dev-python/python-dateutil + >=dev-python/dnspython-1.6.0 + >=dev-python/cssselect-0.7.1 + >=dev-python/cssutils-0.9.9 + >=dev-python/dbus-python-0.82.2 + >=dev-python/imaging-1.1.6 + >=dev-python/lxml-2.2.1 + >=dev-python/mechanize-0.1.11 + >=dev-python/python-dateutil-1.4.1 + >=dev-python/PyQt4-4.9.1[X,svg,webkit] + 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.4:= + virtual/libusb:1= + dev-qt/qtdbus:4= + dev-qt/qtsvg:4= + >=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" + +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" + + # 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}-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} + 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 calibre-mount-helper + export OVERRIDE_CFLAGS="$CFLAGS" OVERRIDE_LDFLAGS="$LDFLAGS" + local libdir=$(get_libdir) + [[ -n $libdir ]] || die "get_libdir returned an empty string" + + 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" + + # Remove dummy calibre-mount-helper which is unused since calibre-0.8.25 + # due to bug #389515 (instead, calibre now calls udisks via dbus). + rm "${ED}usr/bin/calibre-mount-helper" || 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" + + dobashcomp "${ED}"usr/etc/bash_completion.d/calibre + rm -r "${ED}"usr/etc/bash_completion.d + find "${ED}"usr/etc -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 +} -- cgit v1.2.3-65-gdbad