summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-05-21 21:39:22 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-05-21 21:39:22 +0000
commite5fe60a546c0c241bf14f98a62bc75b0af3bf116 (patch)
tree5254a54f4331673ac2e22611e8ae7121ef8c49d5 /app-misc/anki
parentDelete older ebuilds. (diff)
downloadgentoo-2-e5fe60a546c0c241bf14f98a62bc75b0af3bf116.tar.gz
gentoo-2-e5fe60a546c0c241bf14f98a62bc75b0af3bf116.tar.bz2
gentoo-2-e5fe60a546c0c241bf14f98a62bc75b0af3bf116.zip
Set SUPPORT_PYTHON_ABIS (bug #311513). Support sqlalchemy-0.6.0 (bug #316459).
(Portage version: HEAD/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/anki')
-rw-r--r--app-misc/anki/ChangeLog8
-rw-r--r--app-misc/anki/anki-0.9.9.8.6-r1.ebuild62
-rw-r--r--app-misc/anki/files/anki-0.9.9.8.6-sqlalchemy-0.6.patch44
3 files changed, 113 insertions, 1 deletions
diff --git a/app-misc/anki/ChangeLog b/app-misc/anki/ChangeLog
index 3393462d3a73..346051bd377b 100644
--- a/app-misc/anki/ChangeLog
+++ b/app-misc/anki/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/anki
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/anki/ChangeLog,v 1.21 2010/03/09 12:14:36 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/anki/ChangeLog,v 1.22 2010/05/21 21:39:22 arfrever Exp $
+
+*anki-0.9.9.8.6-r1 (21 May 2010)
+
+ 21 May 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ +anki-0.9.9.8.6-r1.ebuild, +files/anki-0.9.9.8.6-sqlalchemy-0.6.patch:
+ Set SUPPORT_PYTHON_ABIS (bug #311513). Support sqlalchemy-0.6.0 (bug #316459).
09 Mar 2010; Jonathan Callen <abcd@gentoo.org> anki-0.9.9.8.1.ebuild,
anki-0.9.9.8.2.ebuild, anki-0.9.9.8.4.ebuild, anki-0.9.9.8.5.ebuild,
diff --git a/app-misc/anki/anki-0.9.9.8.6-r1.ebuild b/app-misc/anki/anki-0.9.9.8.6-r1.ebuild
new file mode 100644
index 000000000000..f3b1c84edb52
--- /dev/null
+++ b/app-misc/anki/anki-0.9.9.8.6-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/anki/anki-0.9.9.8.6-r1.ebuild,v 1.1 2010/05/21 21:39:22 arfrever Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils eutils
+
+DESCRIPTION="A spaced-repetition memory training program (flash cards)"
+HOMEPAGE="http://ichi2.net/anki/"
+SRC_URI="http://anki.googlecode.com/files/${P}.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="furigana +graph latex recording +sound"
+
+RDEPEND="dev-python/beautifulsoup
+ >=dev-python/PyQt4-4.4[X,svg,webkit]
+ >=dev-python/sqlalchemy-0.5.3
+ >=dev-python/simplejson-1.7.3
+ || ( >=dev-python/pysqlite-2.3.0 >=dev-lang/python-2.5[sqlite] )
+ latex? ( app-text/dvipng )
+ furigana? ( app-i18n/kakasi )
+ graph? (
+ dev-python/numpy
+ >=dev-python/matplotlib-0.91.2
+ )
+ recording? (
+ media-sound/sox
+ dev-python/pyaudio
+ media-sound/lame
+ )
+ sound? ( media-video/mplayer )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
+RESTRICT_PYTHON_ABIS="3.*"
+
+PYTHON_MODNAME="anki ankiqt"
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-sqlalchemy-0.6.patch"
+}
+
+src_compile() {
+ distutils_src_compile
+ cd libanki
+ distutils_src_compile
+}
+
+src_install() {
+ distutils_src_install
+ cd libanki
+ distutils_src_install
+ cd ..
+
+ doicon icons/${PN}.png || die
+ make_desktop_entry ${PN} ${PN} ${PN} "Education"
+}
diff --git a/app-misc/anki/files/anki-0.9.9.8.6-sqlalchemy-0.6.patch b/app-misc/anki/files/anki-0.9.9.8.6-sqlalchemy-0.6.patch
new file mode 100644
index 000000000000..08b0eb54b0c8
--- /dev/null
+++ b/app-misc/anki/files/anki-0.9.9.8.6-sqlalchemy-0.6.patch
@@ -0,0 +1,44 @@
+--- libanki/anki/db.py
++++ libanki/anki/db.py
+@@ -65,6 +65,27 @@
+ self._lockDB()
+ self._seen = True
+
++ def save(self, obj):
++ # compat
++ if sqlalchemy.__version__.startswith("0.4."):
++ self._session.save(obj)
++ else:
++ self._session.add(obj)
++
++ def clear(self):
++ # compat
++ if sqlalchemy.__version__.startswith("0.4."):
++ self._session.clear()
++ else:
++ self._session.expunge_all()
++
++ def update(self, obj):
++ # compat
++ if sqlalchemy.__version__.startswith("0.4."):
++ self._session.update(obj)
++ else:
++ self._session.add(obj)
++
+ def execute(self, *a, **ka):
+ x = self._session.execute(*a, **ka)
+ runHook("dbFinished")
+--- libanki/anki/deck.py
++++ libanki/anki/deck.py
+@@ -2841,7 +2841,10 @@
+ def _init(s):
+ "Add a new deck to the database. Return saved deck."
+ deck = Deck()
+- s.save(deck)
++ if sqlalchemy.__version__.startswith("0.4."):
++ s.save(deck)
++ else:
++ s.add(deck)
+ s.flush()
+ return deck
+ _init = staticmethod(_init)