From 69b39e045639354606dbb665a1957213e829391f Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Sun, 15 Jan 2023 20:08:45 -0700 Subject: [PATCH] Add custom server patch version of YaLafi Copied from [0] but reapplied to the newer version of YaLafi. [0]: https://github.com/torik42/YaLafi/pull/222 Signed-off-by: Kenny Ballou --- kbg/packages/python-xyz.scm | 13 ++++++++++++ .../allow-setting-a-custom-server.patch | 21 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 kbg/patches/allow-setting-a-custom-server.patch diff --git a/kbg/packages/python-xyz.scm b/kbg/packages/python-xyz.scm index 171039d..54dbd55 100644 --- a/kbg/packages/python-xyz.scm +++ b/kbg/packages/python-xyz.scm @@ -134,3 +134,16 @@ (synopsis "Yet another LaTeX filter") (description "Yet another LaTeX filter") (license license:gpl3))) + +(define-public python-yalafi-custom-server + (package + (inherit python-yalafi) + (name "python-yalafi-custom-server") + (version "1.4.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "yalafi" version)) + (sha256 + (base32 + "02bn21prgd81gr28vl211dp9mkqfgrrbiz2sqp29y72av6p88lfj")) + (patches (search-patches "./kbg/patches/allow-setting-a-custom-server.patch")))))) diff --git a/kbg/patches/allow-setting-a-custom-server.patch b/kbg/patches/allow-setting-a-custom-server.patch new file mode 100644 index 0000000..36f1a5c --- /dev/null +++ b/kbg/patches/allow-setting-a-custom-server.patch @@ -0,0 +1,21 @@ +--- /yalafi/shell/shell.py ++++ /yalafi/shell/shell.py +@@ -152,7 +152,7 @@ parser.add_argument('--enablecategories', + parser.add_argument('--lt-options', default='') + parser.add_argument('--single-letters') + parser.add_argument('--equation-punctuation') +-parser.add_argument('--server', choices=['my', 'lt', 'stop'], default='') ++parser.add_argument('--server', default='') + parser.add_argument('--lt-server-options', default='') + parser.add_argument('--textgears') + parser.add_argument('--multi-language', action='store_true') +@@ -246,6 +246,9 @@ if cmdline.server == 'stop': + + ltserver_local_cmd + '"\n') + sys.exit() + tex2txt.fatal('could not kill LT server "' + ltserver_local_cmd + '"') ++elif cmdline.server not in ['lt', 'my', 'stop']: ++ ltserver = cmdline.server ++ cmdline.server = 'lt' + + + # option --add-modules: read declarations from root document