From d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 15 Jun 2021 14:57:03 +0100 Subject: gentoo resync : 15.06.2021 --- app-misc/anki/Manifest | 3 +- app-misc/anki/anki-2.1.15-r1.ebuild | 94 ++++++++++++++++++++++++++ app-misc/anki/anki-2.1.15.ebuild | 93 ------------------------- app-misc/anki/files/anki-2.1.15-unescape.patch | 13 ++++ 4 files changed, 109 insertions(+), 94 deletions(-) create mode 100644 app-misc/anki/anki-2.1.15-r1.ebuild delete mode 100644 app-misc/anki/anki-2.1.15.ebuild create mode 100644 app-misc/anki/files/anki-2.1.15-unescape.patch (limited to 'app-misc/anki') diff --git a/app-misc/anki/Manifest b/app-misc/anki/Manifest index 6b32eb8d6b3d..596d31374119 100644 --- a/app-misc/anki/Manifest +++ b/app-misc/anki/Manifest @@ -1,5 +1,6 @@ AUX anki-2.1.0_beta25-web-folder.patch 498 BLAKE2B 5a89ac454e8b4c551c7593bc8d428f9512d1304bd7fd5aa9380a301d92f10ca126a1a319c2ec831d1d5be99c6941c4307a2b674f0a15d2d554b1443fdf053421 SHA512 779806afd6c0eaaac149c89bbe8da2394630aa5a611001307808339f29237b4d7f3db7e1f66241ef67e179a5ab96d64371e1b198044cd9f88389d03a5c9d8478 AUX anki-2.1.15-mpv-args.patch 856 BLAKE2B 02c80c096ee3971cb781ea57ba8ebd63037c37668d57bef8d63f7c551544cd1eec04d134a835af5c918992172493a3b2933b6652e6872da2fe6bd6acb1bf6886 SHA512 ed44a965978dcb2ce85eab99adff59610c51614673415c7e34d1acdc77fa46e05c6b5eba6a4c3fda07ef5b3d3d5d1c9d844276377daff2189cbdf808168dd402 +AUX anki-2.1.15-unescape.patch 474 BLAKE2B f78067433039e22e335811dac2af3b8237a96f5d5025fe36cbea32d117d015fc1fab8f9ac806135e2ec910cdbd10131f731b8ea5fcdb5e88cd6dedbb8322bd8d SHA512 90e5123991120e696a94119413add54a205d87969b8b7f7167bd66d9ac12c6ad5f4ecba4692d7dddb4f8b47bb13aeea502e95a9be0cb72ca578531fde1473e1e DIST anki-2.1.15.tgz 4269571 BLAKE2B 00b351f5ffacb363642e02bf806bcd7c0d9446c9815a75328e7fa37c848b271b135510de17cc012e8cc96d8a52a183a49de84b6f85f562a370255bd36c6f866e SHA512 f3acfa6ff62d43fa461efddd81a8570304ada53b97bd494fdbbe0a0439700d7a52aa62ead31cbaed731be0df96a6cc845a7cf92dcf65f3080dc63282fe5941c3 -EBUILD anki-2.1.15.ebuild 2457 BLAKE2B f2507d15bfb47a71350ff5e0201b61f9e84d6812949c7ed4286730125850014da4c3cff6220330c7f6a3a812191589c8322befaa99a65d7f3fe8ce778187fd34 SHA512 2d6767a0237ae0b3ab56d6c2eebd74a895fe7b532ca659bee75f7b758ae588c681250ca0b9d4f604392992c00a7b227d503bd5d36f0407aa86a37cf5754d029c +EBUILD anki-2.1.15-r1.ebuild 2502 BLAKE2B 4846657c1b97b1f4da76af16551f719729c663a48d36403135a0353e9cdc6c438e72e9ab6602fab525b8e73f40671ebaa9ac3d473f74d146ca34f719523ff94c SHA512 ceb8fa0454549ecb1fea2262228ce858effbc876ebc94d60b9e92234dfc936d476cde59e5f18b5d3a999ae3e3fd32ebd437c8795162e53c831ec087228cc26cf MISC metadata.xml 533 BLAKE2B 25491ed8623750ad197813d9504620f588e2df815a844711f057b544cde1e7622df46018ad32f994c689984dd301049caadf481d67737e94714f3fe57ba7863b SHA512 cc621ffca18afc64c6c1f758d919d950a39d5f447ae7740abe21f5b140fec8e2b8cbcfcfa4422fb5cf55f68c1068686344a8d9020e0aa477b3687ad84bbf9bf0 diff --git a/app-misc/anki/anki-2.1.15-r1.ebuild b/app-misc/anki/anki-2.1.15-r1.ebuild new file mode 100644 index 000000000000..f97f7bb0fbcb --- /dev/null +++ b/app-misc/anki/anki-2.1.15-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_REQ_USE="sqlite" + +inherit desktop optfeature python-single-r1 xdg + +DESCRIPTION="A spaced-repetition memory training program (flash cards)" +HOMEPAGE="https://apps.ankiweb.net" +SRC_URI="https://apps.ankiweb.net/downloads/archive/${P}-source.tgz -> ${P}.tgz" + +LICENSE="AGPL-3+ BSD MIT GPL-3+ CC-BY-SA-3.0 Apache-2.0 CC-BY-2.5" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + $(python_gen_cond_dep ' + >=dev-python/PyQt5-5.12[gui,svg,widgets,${PYTHON_MULTI_USEDEP}] + >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}] + >=dev-python/httplib2-0.7.4[${PYTHON_MULTI_USEDEP}] + dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}] + dev-python/decorator[${PYTHON_MULTI_USEDEP}] + dev-python/jsonschema[${PYTHON_MULTI_USEDEP}] + dev-python/markdown[${PYTHON_MULTI_USEDEP}] + dev-python/requests[${PYTHON_MULTI_USEDEP}] + dev-python/send2trash[${PYTHON_MULTI_USEDEP}] + ') +" +BDEPEND="test? ( + ${RDEPEND} + $(python_gen_cond_dep ' + dev-python/nose[${PYTHON_MULTI_USEDEP}] + dev-python/mock[${PYTHON_MULTI_USEDEP}] + ') + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.1.0_beta25-web-folder.patch + "${FILESDIR}"/${PN}-2.1.15-mpv-args.patch + "${FILESDIR}"/${PN}-2.1.15-unescape.patch +) + +src_prepare() { + default + sed -i -e "s/updates=True/updates=False/" \ + aqt/profiles.py || die +} + +src_compile() { + :; +} + +src_test() { + sed -e "s:nose=nosetests$:nose=\"${EPYTHON} ${BROOT}/usr/bin/nosetests\":" \ + -i tools/tests.sh || die + sed -e "s:nose=nosetests3$:nose=\"${EPYTHON} ${BROOT}/usr/bin/nosetests3\":" \ + -i tools/tests.sh || die + sed -e "s:which nosetests3:which ${BROOT}/usr/bin/nosetests3:" \ + -i tools/tests.sh || die + ./tools/tests.sh || die +} + +src_install() { + doicon ${PN}.png + domenu ${PN}.desktop + doman ${PN}.1 + + dodoc README.md README.development + python_domodule aqt anki + python_newscript runanki anki + + # Localization files go into the anki directory: + python_moduleinto anki + python_domodule locale + + # not sure if this is correct, but + # site-packages/aqt/mediasrv.py wants the directory + insinto /usr/share/anki + doins -r web +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature "LaTeX in cards" "app-text/texlive app-text/dvipng" + optfeature "Record sound" "dev-python/pyaudio media-sound/lame" + optfeature "Playback sound" media-video/mpv media-video/mplayer +} diff --git a/app-misc/anki/anki-2.1.15.ebuild b/app-misc/anki/anki-2.1.15.ebuild deleted file mode 100644 index 7acb0a519044..000000000000 --- a/app-misc/anki/anki-2.1.15.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7,8} ) -PYTHON_REQ_USE="sqlite" - -inherit desktop optfeature python-single-r1 xdg - -DESCRIPTION="A spaced-repetition memory training program (flash cards)" -HOMEPAGE="https://apps.ankiweb.net" -SRC_URI="https://apps.ankiweb.net/downloads/archive/${P}-source.tgz -> ${P}.tgz" - -LICENSE="AGPL-3+ BSD MIT GPL-3+ CC-BY-SA-3.0 Apache-2.0 CC-BY-2.5" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="test" -RESTRICT="!test? ( test )" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - $(python_gen_cond_dep ' - >=dev-python/PyQt5-5.12[gui,svg,widgets,${PYTHON_MULTI_USEDEP}] - >=dev-python/PyQtWebEngine-5.12[${PYTHON_MULTI_USEDEP}] - >=dev-python/httplib2-0.7.4[${PYTHON_MULTI_USEDEP}] - dev-python/beautifulsoup:4[${PYTHON_MULTI_USEDEP}] - dev-python/decorator[${PYTHON_MULTI_USEDEP}] - dev-python/jsonschema[${PYTHON_MULTI_USEDEP}] - dev-python/markdown[${PYTHON_MULTI_USEDEP}] - dev-python/requests[${PYTHON_MULTI_USEDEP}] - dev-python/send2trash[${PYTHON_MULTI_USEDEP}] - ') -" -BDEPEND="test? ( - ${RDEPEND} - $(python_gen_cond_dep ' - dev-python/nose[${PYTHON_MULTI_USEDEP}] - dev-python/mock[${PYTHON_MULTI_USEDEP}] - ') - ) -" - -PATCHES=( - "${FILESDIR}"/${PN}-2.1.0_beta25-web-folder.patch - "${FILESDIR}"/${PN}-2.1.15-mpv-args.patch -) - -src_prepare() { - default - sed -i -e "s/updates=True/updates=False/" \ - aqt/profiles.py || die -} - -src_compile() { - :; -} - -src_test() { - sed -e "s:nose=nosetests$:nose=\"${EPYTHON} ${BROOT}/usr/bin/nosetests\":" \ - -i tools/tests.sh || die - sed -e "s:nose=nosetests3$:nose=\"${EPYTHON} ${BROOT}/usr/bin/nosetests3\":" \ - -i tools/tests.sh || die - sed -e "s:which nosetests3:which ${BROOT}/usr/bin/nosetests3:" \ - -i tools/tests.sh || die - ./tools/tests.sh || die -} - -src_install() { - doicon ${PN}.png - domenu ${PN}.desktop - doman ${PN}.1 - - dodoc README.md README.development - python_domodule aqt anki - python_newscript runanki anki - - # Localization files go into the anki directory: - python_moduleinto anki - python_domodule locale - - # not sure if this is correct, but - # site-packages/aqt/mediasrv.py wants the directory - insinto /usr/share/anki - doins -r web -} - -pkg_postinst() { - xdg_pkg_postinst - optfeature "LaTeX in cards" "app-text/texlive app-text/dvipng" - optfeature "Record sound" "dev-python/pyaudio media-sound/lame" - optfeature "Playback sound" media-video/mpv media-video/mplayer -} diff --git a/app-misc/anki/files/anki-2.1.15-unescape.patch b/app-misc/anki/files/anki-2.1.15-unescape.patch new file mode 100644 index 000000000000..7b03c8d8e1a3 --- /dev/null +++ b/app-misc/anki/files/anki-2.1.15-unescape.patch @@ -0,0 +1,13 @@ +diff --git a/aqt/reviewer.py b/aqt/reviewer.py +index f01fcbd9f..5aaf26669 100644 +--- a/aqt/reviewer.py ++++ b/aqt/reviewer.py +@@ -359,7 +359,7 @@ Please run Tools>Empty Cards""") + cor = stripHTML(cor) + # ensure we don't chomp multiple whitespace + cor = cor.replace(" ", " ") +- cor = parser.unescape(cor) ++ cor = html.unescape(cor) + cor = cor.replace("\xa0", " ") + cor = cor.strip() + given = self.typedAnswer -- cgit v1.2.3