From 789a13b9bb6c5cd3a95f38892a762bde5ddbf6c2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 6 Jul 2013 01:48:04 +0000 Subject: 0.9.38 version bump. Package-Manager: portage-2.2.0_alpha186/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3 --- app-text/calibre/ChangeLog | 8 +- app-text/calibre/Manifest | 12 +- app-text/calibre/calibre-0.9.36.ebuild | 221 --------------------------------- app-text/calibre/calibre-0.9.38.ebuild | 221 +++++++++++++++++++++++++++++++++ 4 files changed, 234 insertions(+), 228 deletions(-) delete mode 100644 app-text/calibre/calibre-0.9.36.ebuild create mode 100644 app-text/calibre/calibre-0.9.38.ebuild (limited to 'app-text') diff --git a/app-text/calibre/ChangeLog b/app-text/calibre/ChangeLog index 5f59cc86761e..ae565e20cb3a 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.289 2013/06/28 13:54:26 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.290 2013/07/06 01:48:02 zmedico Exp $ + +*calibre-0.9.38 (06 Jul 2013) + + 06 Jul 2013; Zac Medico +calibre-0.9.38.ebuild, + -calibre-0.9.36.ebuild: + 0.9.38 version bump. *calibre-0.9.37 (28 Jun 2013) diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest index cae1c47291ee..7b4a38c09aad 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.36.tar.xz 29117576 SHA256 4e0522d61ff5578777603b70d911450badb1b41801dbfd6303eeea196006cbaa SHA512 1663f84bd4c066eacfc73b6411b030cd81b7d0bb84ca99508d59e1418f0c8678b53b04b08eb95412ac0f4ec478619ac35ef48035be652fdd511274f46463b809 WHIRLPOOL 794f541fc80d7badc840706780a128534cede993a70e58353e410b6698257361189bcb67d5bbb9b727985837801d033d7fbbac3a941dca019974788d971a7cc4 DIST calibre-0.9.37.tar.xz 29203040 SHA256 b0c88ae578b192a4906f40c497c075fcf5edc887e1878a8800512abcdd255daf SHA512 1c53551fd92be411d06f37e373f365e6929910b359954b70283d94a1defed436d8ecffbcae05c48af2fa68cfc597f713a661284437b0641583f4cee519e17e1f WHIRLPOOL 787681aa85e42f929d077d3e72e9776e4a7b1fec02a949f3cc6648c047cb3b13ddd3ac3798c381008f26dd6bfeab3d03266035d5aa143531391fc5fcf99a9a33 +DIST calibre-0.9.38.tar.xz 29265476 SHA256 f19718735f923a9c88feb946874b32464fcff02e158431302481b9b87b522f23 SHA512 0f5ae91924a96b4cfeb3112de6afcaf5b512c0495a205e5896f439cb03b2a5067fe881a8f2cab4e0db407421b81f92099c0d744c494738c5135496c1d01d5e33 WHIRLPOOL 1a7582a6694baaaabb13597fd9cef2cceca1da26fa327bbb6244e5a9bb0c32646bcf45bcbab70561125ea61509f753944362b7e2dfdffde7378be07336d70461 EBUILD calibre-0.9.27.ebuild 7090 SHA256 d70a64b711af1399eee7c3c4742b455640bc49012b483a08b41d9211fa72d712 SHA512 b155a496a1f1f562bcbc05f0e3517d94e101e09d53f574a51dcde30db87693d3eba9ae8505033f836db9f1eaa23dcbcec287debcbcacc997a668d01b52979aa6 WHIRLPOOL 2d5224e63766477444a14c8a38a20e4a3653db0f7ff1760fed9cfb95395e7553bbe2908db52f8e04a4a4f4131773d7ea127f569754a86ea3ec579bba04e1da3c -EBUILD calibre-0.9.36.ebuild 7096 SHA256 c3f4a083736ecb41bfe8c3460d144da85775b867431e05eb27018a9d1c37fcf2 SHA512 e5762372d34c96d8100fb612b932b6d6473f9e8343c9d0a59c8e93c8b527e2fdc608ca3900d4f029a21d7714bed572ae4cc3dd65970f1d0a1a1b26607856af3c WHIRLPOOL 1d1f83283ae11f8f31ac97d4198c1469def113f859979f14b52eb60ec6e88edd5277d874c2b92a57446a3899b4183844180efd30c22c84998f61bc7558708be3 EBUILD calibre-0.9.37.ebuild 7096 SHA256 e962b96bdabbef3e3eace7d8c9f83e0f961dec7c889411b6a975c5476752d64a SHA512 c2fb891c7abba8721c58649a3336d679ba1f21bd0638f3fcd9899a4aa268c027375ea61e639e7e00f44f10e43955d780624143462f6d319380efe2086e19aa4a WHIRLPOOL 9ca0971db76a002c459903e88942cef0bd921ce6e047bfe7ba1e0ff62a10d60fc29a42de7c022d1fde3491356dcdf243ae90c69928712f709a2850c6540e1509 -MISC ChangeLog 46185 SHA256 f38682eb4888a8d00f98099fc002e12f01d5b11fd19d67caa2fd1ba71925b7e9 SHA512 446e346150bfdc464cdef9841e2036a7a1fa29db9183a2519ea82bc21b337a4f84196b121c66e32b05ddb55eaf7d527fdc29269634b4637144f9d81416ea43c9 WHIRLPOOL 08caa5317ef8e9b2e92566c9a388c990975f268b1d56fe16c668ab72b99b7e8be52a3e48c63d86a07ec78aedccebdc853b675d6699f431ceb0b6477e21b36475 +EBUILD calibre-0.9.38.ebuild 7096 SHA256 afa9bffe025e26fd298189b80ad7a6a6e89ceaa49cd1a6435824881fd3d236dc SHA512 9cb0368adfaf9bc09b2aa9396aa240c52dec1b72960b9a89679a498924346fe6ca2d75c028ad116995cffad94d83e3c6d1090a417a62557b844e461ff22a032d WHIRLPOOL 01a149b6672b49c4cafeb7857247ced216154c421b9e7ac6243d49f41ca433b4028b642bd80c38454e68e435f5e948db0d8a3dadf5a53bbb036234770ba71a1f +MISC ChangeLog 46337 SHA256 09b8d2f375d0ccfa95a9c416a36fa4e292a333e66e2eeed74124fe594eb2ef0d SHA512 570a39f4f922cd8b146df26cc143b55453be7dafac8f71cc5c418a766defc2e2ce82130a81713a2e4afa3206de301f9462867c923f5e1dd6e986ab0e22ed1819 WHIRLPOOL caa86cd2e804b2872b4d8b614c98d2ebd2752c62af688c38c68553b0936a034464f9e206aeeed283bcc065e0dda832a93f4e886038af6201e77da22c79033d71 MISC metadata.xml 340 SHA256 db5a0163e41af3aa60492fbffbbd971e2ca9d76097d5da9d3aabf3c16e4294b9 SHA512 9cc44065f152a92ed8428da1306dc08ed3222cc84e38c0390480e1fed4f7748ff66fed8456ab25004b406fe019a29b5cab9b4bce5bcd4a934a4390b984a08333 WHIRLPOOL 928948af880ac651243ac947837b22c98528b779e6251aa26e72b4ca6e16bc05caccbae5c665e2ae7dedcecc2f5dd28d05b1f0b598f6e0750c85eedc95aac04c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlHNlZMACgkQ/ejvha5XGaP3LgCgkQ10D6qQGX6lYWkCQD7Aj3xY -sTUAoLS8tiYYlSAieW3CYlx98jD4Fyq9 -=LJTr +iEYEAREIAAYFAlHXd1QACgkQ/ejvha5XGaPGHwCfYMf5rQfVmJ8k2AYAUQbao9lm +OIAAmgK3BPH24PApCeXbYIN/KgMnCK4m +=xT9S -----END PGP SIGNATURE----- diff --git a/app-text/calibre/calibre-0.9.36.ebuild b/app-text/calibre/calibre-0.9.36.ebuild deleted file mode 100644 index 1165e73f44f6..000000000000 --- a/app-text/calibre/calibre-0.9.36.ebuild +++ /dev/null @@ -1,221 +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.36.ebuild,v 1.1 2013/06/21 23:33:57 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" - -# Restrict mirror due non-free prs500 fonts (bug #470212). -RESTRICT="mirror" - -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 ~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 - virtual/python-imaging - >=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" - - # Remove non-free fonts (bug #470212). - rm -r resources/fonts/prs500 || 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} - 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" - - # 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" - - # 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.38.ebuild b/app-text/calibre/calibre-0.9.38.ebuild new file mode 100644 index 000000000000..45f0c2597816 --- /dev/null +++ b/app-text/calibre/calibre-0.9.38.ebuild @@ -0,0 +1,221 @@ +# 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.38.ebuild,v 1.1 2013/07/06 01:48:02 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" + +# Restrict mirror due non-free prs500 fonts (bug #470212). +RESTRICT="mirror" + +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 ~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 + virtual/python-imaging + >=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" + + # Remove non-free fonts (bug #470212). + rm -r resources/fonts/prs500 || 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} + 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" + + # 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" + + # 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