summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorĐức Nam Trần2016-03-26 15:18:54 +0700
committerĐức Nam Trần2016-03-26 15:18:54 +0700
commit6cbc563db15b068965c1ffab337d3ce313520af1 (patch)
treee1970e3fa9b6ab6224b51e541a751f491f34ada0
downloadaur-ldoce5viewer-git.tar.gz
Clone from AUR bot and add patch to run with python-whoosh 2.7
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD40
-rw-r--r--ldoce5viewer-git.install7
-rw-r--r--whoosh2.7.patch32
4 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0274941ea55c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = ldoce5viewer-git
+ pkgdesc = Fast dictionary viewer for the Longman Dictionary of Contemporary English (LDOCE) 5th Edition
+ pkgver = r43.8004fb9
+ pkgrel = 1
+ url = http://hakidame.net/ldoce5viewer/
+ install = ldoce5viewer-git.install
+ arch = any
+ license = GPL3
+ depends = git
+ depends = python-pyqt4
+ depends = python-lxml
+ depends = gstreamer0.10-python
+ depends = gstreamer0.10-good-plugins
+ depends = gstreamer0.10-ugly-plugins
+ depends = python-whoosh
+ depends = phonon-qt4
+ source = git://github.com/ciscorn/ldoce5viewer.git
+ source = whoosh2.7.patch
+ sha512sums = SKIP
+ sha512sums = SKIP
+
+pkgname = ldoce5viewer-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a98c7ac48e09
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+_reponame=ldoce5viewer
+pkgname="${_reponame}-git"
+pkgver=r43.8004fb9
+pkgrel=1
+pkgdesc="Fast dictionary viewer for the Longman Dictionary of Contemporary English (LDOCE) 5th Edition"
+url="http://hakidame.net/ldoce5viewer/"
+license=(GPL3)
+arch=('any')
+depends=(git python-pyqt4 python-lxml gstreamer0.10-python gstreamer0.10-good-plugins gstreamer0.10-ugly-plugins python-whoosh phonon-qt4)
+install="${_reponame}"-git.install
+source=("git://github.com/ciscorn/ldoce5viewer.git" "whoosh2.7.patch")
+sha512sums=('SKIP' "SKIP")
+
+pkgver() {
+ cd "${srcdir}/${_reponame}"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${srcdir}/${_reponame}"
+
+ make build
+}
+
+package() {
+ cd "${srcdir}/${_reponame}"
+
+ patch -p1 < ../whoosh2.7.patch
+ python setup.py install --optimize=1 --root="${pkgdir}"
+ install -Dm644 "ldoce5viewer/qtgui/resources/ldoce5viewer.svg" \
+ "${pkgdir}/usr/share/pixmaps/ldoce5viewer.svg"
+ install -Dm644 "ldoce5viewer.desktop" \
+ "${pkgdir}/usr/share/applications/ldoce5viewer.desktop"
+ install -Dm644 "LICENSE.txt" \
+ "${pkgdir}/usr/share/licenses/$pkgname/LICENSE.txt"
+ install -Dm644 "COPYING.txt" \
+ "${pkgdir}/usr/share/licenses/$pkgname/COPYING.txt"
+}
+
diff --git a/ldoce5viewer-git.install b/ldoce5viewer-git.install
new file mode 100644
index 000000000000..6f0db7c741b6
--- /dev/null
+++ b/ldoce5viewer-git.install
@@ -0,0 +1,7 @@
+post_install() {
+ [ -x usr/bin/update-desktop-database ] && update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/whoosh2.7.patch b/whoosh2.7.patch
new file mode 100644
index 000000000000..18082dc742dd
--- /dev/null
+++ b/whoosh2.7.patch
@@ -0,0 +1,32 @@
+diff --git a/ldoce5viewer/qtgui/indexer.py b/ldoce5viewer/qtgui/indexer.py
+index 0fedba6..582e99f 100644
+--- a/ldoce5viewer/qtgui/indexer.py
++++ b/ldoce5viewer/qtgui/indexer.py
+@@ -352,8 +352,12 @@ class IndexingThread(QThread):
+ i += 1
+ if i % 10000 == 0:
+ self._message('{0} items added'.format(i))
+- fulltext_hwdphr_maker.add_item(itemtype, content, asfilter,
++
++ try:
++ fulltext_hwdphr_maker.add_item(itemtype, content, asfilter,
+ label, path, prio, sortkey)
++ except Exception as e:
++ print ("itemtype=", itemtype, "content=", content, "label=", label, "path=", path, e)
+
+ self._message('{0} items were added.'.format(i))
+ self._message('Finalizing...')
+@@ -379,8 +383,11 @@ class IndexingThread(QThread):
+ i += 1
+ if i % 10000 == 0:
+ self._message('{0} items added'.format(i))
+- fulltext_defexa_maker.add_item(itemtype, content, asfilter,
+- label, path, prio, sortkey)
++ try:
++ fulltext_defexa_maker.add_item(itemtype, content, asfilter,
++ label, path, prio, sortkey)
++ except Exception as e:
++ print ("itemtype=", itemtype, "content=", content, "=label", label, "path=", path, e)
+
+ self._message('{0} items were added.'.format(i))
+ self._message('Finalizing...')```