diff options
author | Niels Martignène | 2015-07-09 14:31:42 +0200 |
---|---|---|
committer | Niels Martignène | 2015-07-09 14:33:34 +0200 |
commit | bc10e021c31c8f0e0e6516f2c103ca295ae4338b (patch) | |
tree | ac6e510a8f27cdbea1ffb816ce53687ddfdc0244 | |
download | aur-bc10e021c31c8f0e0e6516f2c103ca295ae4338b.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | disable-auto-update.patch | 10 | ||||
-rw-r--r-- | fix-arch-pyqtconfig.patch | 29 |
4 files changed, 123 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..707e8f24e276 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = anki12 + pkgdesc = Helps you remember facts (like words/phrases in a foreign language) efficiently + pkgver = 1.2.11 + pkgrel = 1 + url = http://ankisrs.net/ + arch = any + license = GPL + makedepends = setuptools + makedepends = desktop-file-utils + depends = python2-pyqt + depends = python2-sqlalchemy + depends = python2-simplejson + depends = python2-pysqlite + optdepends = python2-matplotlib: for graph support + optdepends = python2-beautifulsoup3: for SuperMemo import support + optdepends = sox: for audio recording support + conflicts = anki + replaces = anki12 + source = http://ankisrs.net/download/mirror/archive/anki-1.2.11.tgz + source = disable-auto-update.patch + source = fix-arch-pyqtconfig.patch + sha256sums = ca075fd0c0d6851d22046de8f6fa90d7c442cdd4a6783f7c6ffad7fbc46f5089 + sha256sums = 9ef3c30b5103b7cd52286e54aa17a79f440a92b76cd8146c63b69ddf48137594 + sha256sums = f38816a01f50a861ae879764a98a3d8038d4aa331021d1b399d24f05b52b1dad + +pkgname = anki12 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..73a967d27b70 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Niels Martignène <niels.martignene@gmail.com> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Timm Preetz <timm@preetz.us> +# Contributor: Michael 'manveru' Fellinger <m.fellinger@gmail.com> +# Contributor: Dave Pretty <david dot pretty at gmail dot com> + +pkgname=anki12 +pkgver=1.2.11 +pkgrel=1 +pkgdesc="Helps you remember facts (like words/phrases in a foreign language) efficiently" +url="http://ankisrs.net/" +license=('GPL') +arch=('any') +conflicts=('anki') +replaces=('anki12') +depends=('python2-pyqt' 'python2-sqlalchemy' 'python2-simplejson' + 'python2-pysqlite') +optdepends=('python2-matplotlib: for graph support' + 'python2-beautifulsoup3: for SuperMemo import support' + 'sox: for audio recording support') +makedepends=('setuptools' 'desktop-file-utils') +source=("http://ankisrs.net/download/mirror/archive/anki-$pkgver.tgz" + 'disable-auto-update.patch' + 'fix-arch-pyqtconfig.patch') +sha256sums=('ca075fd0c0d6851d22046de8f6fa90d7c442cdd4a6783f7c6ffad7fbc46f5089' + '9ef3c30b5103b7cd52286e54aa17a79f440a92b76cd8146c63b69ddf48137594' + 'f38816a01f50a861ae879764a98a3d8038d4aa331021d1b399d24f05b52b1dad') + +prepare() { + cd "anki-${pkgver}" + + patch -Np1 <"${srcdir}/disable-auto-update.patch" + patch -Np1 <"${srcdir}/fix-arch-pyqtconfig.patch" +} + +build() { + cd "anki-${pkgver}" + + sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' anki + sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \ + $(find . -regex ".*.py\|.*.recipe") +} + +package() { + cd "anki-${pkgver}" + export PYTHONPATH="${srcdir}/anki-${pkgver}/libanki" + + cd libanki + python2 setup.py install --root "${pkgdir}" + + cd .. + python2 setup.py install --root "${pkgdir}" + + # .desktop file and icon + desktop-file-install --dir "${pkgdir}/usr/share/applications" anki.desktop + install -D -m 644 icons/anki.png "${pkgdir}/usr/share/pixmaps/anki.png" +} diff --git a/disable-auto-update.patch b/disable-auto-update.patch new file mode 100644 index 000000000000..a21619150c84 --- /dev/null +++ b/disable-auto-update.patch @@ -0,0 +1,10 @@ +--- a/ankiqt/ui/main.py 2011-03-28 09:33:31.000000000 +0200 ++++ b/ankiqt/ui/main.py 2014-01-12 11:38:39.058868490 +0100 +@@ -2615,7 +2615,6 @@ + + def setupAutoUpdate(self): + self.autoUpdate = ui.update.LatestVersionFinder(self) +- self.connect(self.autoUpdate, SIGNAL("newVerAvail"), self.newVerAvail) + self.connect(self.autoUpdate, SIGNAL("newMsg"), self.newMsg) + self.connect(self.autoUpdate, SIGNAL("clockIsOff"), self.clockIsOff) + self.autoUpdate.start() diff --git a/fix-arch-pyqtconfig.patch b/fix-arch-pyqtconfig.patch new file mode 100644 index 000000000000..47f8de5f1953 --- /dev/null +++ b/fix-arch-pyqtconfig.patch @@ -0,0 +1,29 @@ +diff -ur a/ankiqt/ui/main.py b/ankiqt/ui/main.py +--- a/ankiqt/ui/main.py 2014-06-16 00:57:52.945348513 +0200 ++++ b/ankiqt/ui/main.py 2014-06-16 01:00:49.724004647 +0200 +@@ -9,8 +9,6 @@ + from PyQt4.QtCore import * + from PyQt4.QtGui import * + from PyQt4.QtWebKit import QWebPage +-from PyQt4 import pyqtconfig +-QtConfig = pyqtconfig.Configuration() + from anki import DeckStorage + from anki.errors import * + from anki.sound import hasSound, playFromText, clearAudioQueue, stripSounds +diff -ur a/ankiqt/ui/utils.py b/ankiqt/ui/utils.py +--- a/ankiqt/ui/utils.py 2014-06-16 00:57:52.955348436 +0200 ++++ b/ankiqt/ui/utils.py 2014-06-16 01:01:16.387138825 +0200 +@@ -219,13 +219,6 @@ + key += "Geom" + if ankiqt.mw.config.get(key): + widget.restoreGeometry(ankiqt.mw.config[key]) +- if sys.platform.startswith("darwin") and offset: +- from ankiqt.ui.main import QtConfig as q +- minor = (q.qt_version & 0x00ff00) >> 8 +- if minor > 6: +- # bug in osx toolkit +- s = widget.size() +- widget.resize(s.width(), s.height()+offset*2) + + def saveState(widget, key): + key += "State" |