From 147438bf072ec988608748cd78c8c84f94ff5ccd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 Aug 2013 20:40:45 +0000 Subject: 0.9.42 version bump. Package-Manager: portage-2.2.0_alpha191_p11/cvs/Linux i686 Manifest-Sign-Key: 0xFDE8EF85AE5719A3 --- app-text/calibre/ChangeLog | 8 +- app-text/calibre/Manifest | 12 +- app-text/calibre/calibre-0.9.40.ebuild | 221 -------------------------------- app-text/calibre/calibre-0.9.42.ebuild | 224 +++++++++++++++++++++++++++++++++ 4 files changed, 237 insertions(+), 228 deletions(-) delete mode 100644 app-text/calibre/calibre-0.9.40.ebuild create mode 100644 app-text/calibre/calibre-0.9.42.ebuild (limited to 'app-text') diff --git a/app-text/calibre/ChangeLog b/app-text/calibre/ChangeLog index 6e6c7dfd5314..5fcb9948cf42 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.293 2013/07/28 01:31:17 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/calibre/ChangeLog,v 1.294 2013/08/02 20:40:43 zmedico Exp $ + +*calibre-0.9.42 (02 Aug 2013) + + 02 Aug 2013; Zac Medico +calibre-0.9.42.ebuild, + -calibre-0.9.40.ebuild: + 0.9.42 version bump. *calibre-0.9.41 (28 Jul 2013) diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest index 0c913315cf1e..9c4617ecbdec 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.40.tar.xz 29285764 SHA256 bf6cfa37c42cedebc436148a0c0646548f5cde6d26480c0e2bf3bae3b5672de5 SHA512 b7425e19e2c4f981b2196f098c1d2a4aeded07a8c4abca057b06b357a9baab2790c74856523e3db70357722cd7b738aab3f14e2fe8ab0fed6346ae9ca39de5b9 WHIRLPOOL 10be29038d509a1a039176e002c752da1383371cd485675da8a287bcf29799ee2e7c46b722a044682ba7534226be611b143457ca78530315a2252b35dd1a3e94 DIST calibre-0.9.41.tar.xz 29330184 SHA256 1cc318d6046888c506cf051b7ea66c95dbcd7b28541b068f4410a477e5332257 SHA512 338b202eb4e2f77fe2836853e99a9f12f242698ee2fa86c17182267a2562699fb211eac68f1e6d3ee6112713245ae437fa8926034ca1648bdc61b64fc7b6b3ad WHIRLPOOL 78a6276dddb6125784d5147933b03e495271055b7b38ab740642345b7619ae348478ef32ecbf421a8dd7ab935de272f7e2a566be9faa014f724dd03fc55412ec +DIST calibre-0.9.42.tar.xz 29351712 SHA256 6cd64b54b4c0b696d9a6cfd50527c10cbd7b473a622f2e0f2e2ef81be680fe1f SHA512 22087645893e8626d107093d0308dfeb5a965664f6d3fe326930d663f01ad0873a32af9180de499bca1cf4c07c4634e88c952c27c35368466a1b492f24fcf829 WHIRLPOOL 2cfb0185119a3ed2c52e837028d314094d3b7a458d21a638478e3b066cde5183ed6d5d0a2bae1ddcee5aed53a231c848a57f0fe799fba00efeafda788a400eb2 EBUILD calibre-0.9.27.ebuild 7090 SHA256 d70a64b711af1399eee7c3c4742b455640bc49012b483a08b41d9211fa72d712 SHA512 b155a496a1f1f562bcbc05f0e3517d94e101e09d53f574a51dcde30db87693d3eba9ae8505033f836db9f1eaa23dcbcec287debcbcacc997a668d01b52979aa6 WHIRLPOOL 2d5224e63766477444a14c8a38a20e4a3653db0f7ff1760fed9cfb95395e7553bbe2908db52f8e04a4a4f4131773d7ea127f569754a86ea3ec579bba04e1da3c -EBUILD calibre-0.9.40.ebuild 7096 SHA256 7d513abe7f496d00dfe3e081c879bc2d23a370e203378b5a89fddec9ac53d588 SHA512 2d4995eb4c866f0cf441bfef4b62488175b2f1fe03c97cb3de9bf93661de1564fe67e88530e4277bb453fdc96b4d7b40612bf40d2a9a52efac4f517fd91979bf WHIRLPOOL 9a7c271e7fab94b812614baa32e9283e85dccfaf28c194c9ca28569b8b626c2856de072b044134bc89c6544059e59652cb6886ea4aafd6729c2cb4a07fcc98f8 EBUILD calibre-0.9.41.ebuild 7096 SHA256 b733a2497c91f768a471af93ade732ae50fc5f117b80f9d55dee49ca38dcea88 SHA512 d6b7f4f37ef83e47fccf653790d174a9764ca664e0d9c15033d44633e13a1a737c2c13a772a203fd30447f80e19f8766fd14dcb1adcfbcd487a8a790315c6a24 WHIRLPOOL 7eef4543d58fe09f0ba8a1919edff9e27ce46033811012e316c973f90a31eaa03e92d648dc4d3fbd9a8ad74e7c5daa7718107e8c741c4a35173c173136d1e026 -MISC ChangeLog 46793 SHA256 5a91552a07a67b6340385ee89b45fde99264a0abcac591001b51b49760c22e1a SHA512 68d3680a9c4fd0d452c4220c17b5a2335485a4431134520c2554dbda5ecf0650c10f2c7530bc9472f8ddfb210c0429d35cae701e50c4b40845c575d356b232f9 WHIRLPOOL deb9d90bc23c6853477c7cd32f4eb310bd5d98f36d6a1df30cff859fb6a0d894cbc97526c6363c212390429c89ce2ae65fbdcb5b97267e852a1980ba4529e2dc +EBUILD calibre-0.9.42.ebuild 7253 SHA256 9ba93dfa2e2f827f334c490846f49cae89563da07963ae9162a22d12d02f5d19 SHA512 f2d80e84e20037f2b90e33ba708274c01e79908c875b23e7e1c527796bc1ae533bea06013e8b684bf0ae53bb2448650397ab93a38341a2f7ce82d21698a09dcf WHIRLPOOL 9f455d2220dd001232f0a5a5359cb77761c8e7d92e67da006d824a67996085b9209548132591ba154ba428519826c40eb5acb9535eacced6c6de6d8634e0b480 +MISC ChangeLog 46945 SHA256 75477612912be843565f9189890af42a7b853c6485115c8ede829d04cfc40209 SHA512 274f96471a930f41e4f4409d735afd39f757c57f89b1bec91333ff14ef0a759a9a31820e2573f1992581b1a54780e6a825ea5eb3a653b2f5de1ac21f78ea1c6f WHIRLPOOL f7f4ef35a621d7de8c0d5a27e2a8ca1a7fd487c7d8d295704958aa2648c1382de09b946da9b5e4a53880ada65966e4add2479f75828011d02595c664d5f071bb MISC metadata.xml 340 SHA256 db5a0163e41af3aa60492fbffbbd971e2ca9d76097d5da9d3aabf3c16e4294b9 SHA512 9cc44065f152a92ed8428da1306dc08ed3222cc84e38c0390480e1fed4f7748ff66fed8456ab25004b406fe019a29b5cab9b4bce5bcd4a934a4390b984a08333 WHIRLPOOL 928948af880ac651243ac947837b22c98528b779e6251aa26e72b4ca6e16bc05caccbae5c665e2ae7dedcecc2f5dd28d05b1f0b598f6e0750c85eedc95aac04c -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlH0dGYACgkQ/ejvha5XGaOG9wCcDf7JRkn8WAbmS4sRf+n34hwB -DaoAmQHOklavn2h9N1458ztvnwrOkZ8M -=boGm +iEYEAREIAAYFAlH8GU0ACgkQ/ejvha5XGaNboACfc/sVn8ZIwoixzxE9BzqBwdYk +4R8AniBQD+2w+SPevvUvG18MRBoR3ssL +=8XSD -----END PGP SIGNATURE----- diff --git a/app-text/calibre/calibre-0.9.40.ebuild b/app-text/calibre/calibre-0.9.40.ebuild deleted file mode 100644 index 17a4fc5e1132..000000000000 --- a/app-text/calibre/calibre-0.9.40.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.40.ebuild,v 1.1 2013/07/21 17:11:13 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.42.ebuild b/app-text/calibre/calibre-0.9.42.ebuild new file mode 100644 index 000000000000..dc607e96f58f --- /dev/null +++ b/app-text/calibre/calibre-0.9.42.ebuild @@ -0,0 +1,224 @@ +# 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.42.ebuild,v 1.1 2013/08/02 20:40:43 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" + + sed -e 's:^Name=calibre %F$:Name=calibre:' \ + -e 's:^Exec=calibre$:Exec=calibre %F:' \ + -i "${HOME}"/.local/share/applications/calibre-gui.desktop || die + 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