Skip to content

Commit

Permalink
app-misc/anki: Fix dependencies.
Browse files Browse the repository at this point in the history
Thanks thanks Michael Mounteney and Dennis New.
EAPI=6,
remove unneeded overrides of src_configure and src_compile.

Closes: https://bugs.gentoo.org/639354
Package-Manager: Portage-2.3.19, Repoman-2.3.6
  • Loading branch information
xmw committed Dec 18, 2017
1 parent aaf3135 commit f847d77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
26 changes: 14 additions & 12 deletions app-misc/anki/anki-2.1.0_beta25.ebuild
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="5"
EAPI=6

PYTHON_COMPAT=( python3_4 python3_5 python3_6 )
PYTHON_COMPAT=( python3_6 )
PYTHON_REQ_USE="sqlite"

inherit eutils python-single-r1
inherit eutils python-single-r1 xdg

DESCRIPTION="A spaced-repetition memory training program (flash cards)"
HOMEPAGE="https://apps.ankiweb.net"
Expand All @@ -25,6 +25,9 @@ RDEPEND="${PYTHON_DEPS}
dev-python/PyQt5[gui,svg,webkit,${PYTHON_USEDEP}]
>=dev-python/httplib2-0.7.4[${PYTHON_USEDEP}]
dev-python/beautifulsoup[${PYTHON_USEDEP}]
dev-python/decorator[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/send2trash[${PYTHON_USEDEP}]
recording? (
media-sound/lame
Expand All @@ -37,24 +40,18 @@ RDEPEND="${PYTHON_DEPS}
)"
DEPEND=""

PATCHES=( "${FILESDIR}"/${P}-web-folder.patch )

pkg_setup() {
python-single-r1_pkg_setup
}

src_prepare() {
default
sed -i -e "s/updates=True/updates=False/" \
aqt/profiles.py || die
}

# Nothing to configure or compile
src_configure() {
:;
}

src_compile() {
:;
}

src_install() {
cp tools/runanki.system tools/anki
doicon ${PN}.png
Expand All @@ -68,4 +65,9 @@ src_install() {
# 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
python_moduleinto aqt
python_domodule web
}
11 changes: 11 additions & 0 deletions app-misc/anki/files/anki-2.1.0_beta25-web-folder.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- anki-2.1.0beta25/aqt/mediasrv.py
+++ anki-2.1.0beta25/aqt/mediasrv.py
@@ -13,7 +13,7 @@
# locate web folder in source/binary distribution
def _getExportFolder():
# running from source?
- srcFolder = os.path.join(os.path.dirname(__file__), "..")
+ srcFolder = os.path.dirname(__file__)
webInSrcFolder = os.path.abspath(os.path.join(srcFolder, "web"))
if os.path.exists(webInSrcFolder):
return webInSrcFolder

0 comments on commit f847d77

Please sign in to comment.