diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | ltdirectory.patch | 12 | ||||
-rw-r--r-- | ltserver_local_cmd.patch | 14 |
4 files changed, 50 insertions, 6 deletions
@@ -1,14 +1,18 @@ pkgbase = python-yalafi pkgdesc = Yet another LaTeX filter pkgver = 1.1.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/matze-dd/YaLafi arch = any license = GPL3 makedepends = python-setuptools depends = python3 source = https://files.pythonhosted.org/packages/0f/57/57827ab252b49616253bb007e823b810005a9a4873b8c0ff0f70ef1954d7/yalafi-1.1.2.tar.gz + source = ltdirectory.patch + source = ltserver_local_cmd.patch md5sums = ca429ef24e46735d3db67583cfa1a79a + md5sums = SKIP + md5sums = SKIP pkgname = python-yalafi @@ -3,22 +3,36 @@ pkgname=python-yalafi pkgver=1.1.2 -pkgrel=1 +pkgrel=2 pkgdesc="Yet another LaTeX filter" url="https://github.com/matze-dd/YaLafi" depends=('python3' ) makedepends=('python-setuptools') license=('GPL3') arch=('any') -source=('https://files.pythonhosted.org/packages/0f/57/57827ab252b49616253bb007e823b810005a9a4873b8c0ff0f70ef1954d7/yalafi-1.1.2.tar.gz') -md5sums=('ca429ef24e46735d3db67583cfa1a79a') +source=( + 'https://files.pythonhosted.org/packages/0f/57/57827ab252b49616253bb007e823b810005a9a4873b8c0ff0f70ef1954d7/yalafi-1.1.2.tar.gz' + 'ltdirectory.patch' + 'ltserver_local_cmd.patch' +) +md5sums=( + 'ca429ef24e46735d3db67583cfa1a79a' + SKIP + SKIP +) + +prepare() { + cd "$srcdir/yalafi-1.1.2" + patch -p1 < "$srcdir/ltdirectory.patch" + patch -p1 < "$srcdir/ltserver_local_cmd.patch" +} build() { - cd $srcdir/yalafi-1.1.2 + cd "$srcdir/yalafi-1.1.2" python setup.py build } package() { - cd $srcdir/yalafi-1.1.2 + cd "$srcdir/yalafi-1.1.2" python setup.py install --root="$pkgdir" --optimize=1 } diff --git a/ltdirectory.patch b/ltdirectory.patch new file mode 100644 index 000000000000..6e6519e0237a --- /dev/null +++ b/ltdirectory.patch @@ -0,0 +1,12 @@ +diff -ruN a/yalafi/shell/shell.py b/yalafi/shell/shell.py +--- a/yalafi/shell/shell.py 2020-05-27 17:32:05.000000000 +0200 ++++ b/yalafi/shell/shell.py 2020-07-02 21:29:01.241960928 +0200 +@@ -34,7 +34,7 @@ + # - Java has to be installed,
+ # under Cygwin the Windows version is used
+ #
+-ltdirectory = '../LT/LanguageTool-4.7/'
++ltdirectory = '/usr/share/java/languagetool'
+ ltcommand = 'java -jar languagetool-commandline.jar'
+
+ # on option --server lt: address of server hosted by LT
diff --git a/ltserver_local_cmd.patch b/ltserver_local_cmd.patch new file mode 100644 index 000000000000..bef197edbeb7 --- /dev/null +++ b/ltserver_local_cmd.patch @@ -0,0 +1,14 @@ +diff -ruN a/yalafi/shell/shell.py b/yalafi/shell/shell.py +--- a/yalafi/shell/shell.py 2020-05-27 17:32:05.000000000 +0200 ++++ b/yalafi/shell/shell.py 2020-07-02 21:24:39.811059005 +0200 +@@ -44,9 +44,7 @@ + # on option --server my: use local LT server
+ #
+ ltserver_local = 'http://localhost:8081/v2/check'
+-ltserver_local_cmd = ('java -cp'
+- + ' languagetool-server.jar org.languagetool.server.HTTPServer'
+- + ' --port 8081')
++ltserver_local_cmd = 'languagetool --http --port 8081'
+
+ # config file
+ #
|