diff --git a/srcpkgs/anki/patches/001-qt.patch b/srcpkgs/anki/patches/001-qt.patch new file mode 100644 index 00000000000..759496cd55b --- /dev/null +++ b/srcpkgs/anki/patches/001-qt.patch @@ -0,0 +1,11 @@ +--- aqt/qt.py ++++ aqt/qt.py +@@ -38,7 +38,7 @@ qtmajor = (QT_VERSION & 0xff0000) >> 16 + qtminor = (QT_VERSION & 0x00ff00) >> 8 + qtpoint = QT_VERSION & 0xff + +-if qtmajor != 5 or qtminor != 9: ++if qtmajor != 5 or qtminor < 9: + raise Exception("Anki only supports Qt 5.9.x at this time.") + + # GUI code assumes python 3.6+ diff --git a/srcpkgs/anki/template b/srcpkgs/anki/template index d7b4e01c161..d5628d671bc 100644 --- a/srcpkgs/anki/template +++ b/srcpkgs/anki/template @@ -1,11 +1,13 @@ # Template file for 'anki' pkgname=anki version=2.1.4 -revision=1 +revision=2 noarch=yes -depends="python3-PyQt5-webkit python3-httplib2 python3-SQLAlchemy - python3-send2trash python3-BeautifulSoup4" +build_style=gnu-makefile pycompile_dirs="/usr/share/anki/anki /usr/share/anki/aqt" +depends="python3-PyQt5-webengine python3-requests python3-SQLAlchemy + python3-PyAudio python3-mpv python3-Markdown python3-send2trash + python3-BeautifulSoup4 python3-decorator" short_desc="Spaced repetition flashcard program" maintainer="Steve Prybylski " license="AGPL-3.0-or-later" @@ -13,20 +15,6 @@ homepage="https://apps.ankiweb.net" distfiles="https://apps.ankiweb.net/downloads/current/anki-${version}-source.tgz" checksum=666886a36609ec605907da99a8373bc2d0a94704eefb14f60de0d6cf783bb701 -do_install() { - vmkdir usr/share/anki - for f in anki aqt designer locale anki.xml; do - vcopy $f usr/share/anki - done - - # icons - vmkdir usr/share/pixmaps - for p in anki.xpm anki.png; do - vcopy $p usr/share/pixmaps - done - vinstall anki.desktop 644 usr/share/applications - vbin runanki anki - vman anki.1 - +post_install() { vlicense LICENSE } diff --git a/srcpkgs/python-PyAudio/template b/srcpkgs/python-PyAudio/template new file mode 100644 index 00000000000..074f96addaa --- /dev/null +++ b/srcpkgs/python-PyAudio/template @@ -0,0 +1,31 @@ +# Template file for 'python-PyAudio' +pkgname=python-PyAudio +version=0.2.11 +revision=1 +wrksrc="PyAudio-${version}" +build_style=python-module +pycompile_module="pyaudio.py" +hostmakedepends="python-setuptools python3-setuptools" +makedepends="python-devel python3-devel portaudio-devel" +short_desc="Python2 Bindings for PortAudio, a cross-platform audio IO library" +maintainer="Cameron Nemo " +license="MIT" +homepage="https://people.csail.mit.edu/hubert/pyaudio/" +distfiles="${PYPI_SITE}/P/PyAudio/PyAudio-${version}.tar.gz" +checksum=93bfde30e0b64e63a46f2fd77e85c41fd51182a4a3413d9edfaf9ffaa26efb74 + +post_install() { + linestart=$(grep -n "Copyright (c) 2006 Hubert Pham" README | cut -d: -f1) + lineend=$(grep -n "WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." README | cut -d: -f1) + sed -n "${linestart},${lineend}p" < README > LICENSE + vlicense LICENSE +} + +python3-PyAudio_package() { + pycompile_module="pyaudio.py" + short_desc="${short_desc/Python2/Python3}" + pkg_install() { + vmove usr/lib/python3* + vlicense LICENSE + } +} diff --git a/srcpkgs/python3-PyAudio b/srcpkgs/python3-PyAudio new file mode 120000 index 00000000000..4abbbbd90d2 --- /dev/null +++ b/srcpkgs/python3-PyAudio @@ -0,0 +1 @@ +python-PyAudio \ No newline at end of file