Github messages for voidlinux
 help / color / mirror / Atom feed
From: Ophidiophobia <Ophidiophobia@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] LanguageTool: discontinue packaging like Arch
Date: Wed, 22 Feb 2023 01:33:43 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42390@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1830 bytes --]

There is a new pull request by Ophidiophobia against master on the void-packages repository

https://github.com/Ophidiophobia/void-packages languagetool_texstudio_fix
https://github.com/void-linux/void-packages/pull/42390

LanguageTool: discontinue packaging like Arch
Template of LanguageTool followed Arch's [Java Package Guidelines](https://wiki.archlinux.org/title/Java_Package_Guidelines) and put files in several places. Arch's [bin wrapper](https://github.com/archlinux/svntogit-community/blob/master/languagetool/trunk/languagetool.sh) "fixed" all issues by defining (many) class paths. This approach fails if other tools try to start the jars directly without doing those "fixes" (see #42372).

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio. Fixes #42372 "LanguageTool does not start with TeXstudio"

####Possible points of interests
- /usr/bin/languagetool starts the gui variant because that seems to be the version when upstream says to start the standalone version.
- languagetool-cli : -cmd or -command-line instead of -cli?
- languagetool-http(s): -server is ambigious and -server-http(s) too long
- commit message is too wordy but I am not sure which parts to throw away


<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly** (issue use case, "--help", checked and corrected commit message using languagetool-cli)

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-libc)

A patch file from https://github.com/void-linux/void-packages/pull/42390.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-languagetool_texstudio_fix-42390.patch --]
[-- Type: text/x-diff, Size: 4628 bytes --]

From c0f75de37481c204c3517f17061b9c38bafeaa32 Mon Sep 17 00:00:00 2001
From: Ophidiophobia <sandstrahl700@gmx.de>
Date: Wed, 22 Feb 2023 00:39:06 +0100
Subject: [PATCH] LanguageTool: discontinue packaging like Arch

Template of LanguageTool followed Arch's Java Package Guidelines and put files in several places.
Arch's bin wrapper "fixed" all issues by defining (many) class paths.
This approach fails if other tools try to start the jars directly without doing those "fixes".

Use four very simple binary script wrappers tracked in our git instead.

Install LanguageTool in one single directory.
This change makes LanguageTool behave like upstream and easier to configure and use in other applications like TeXstudio.
Fixes #42372 "LanguageTool does not start with TeXstudio"
---
 .../LanguageTool/files/languagetool-cli.sh    |  2 ++
 .../LanguageTool/files/languagetool-gui.sh    |  2 ++
 .../LanguageTool/files/languagetool-http.sh   |  2 ++
 .../LanguageTool/files/languagetool-https.sh  |  2 ++
 srcpkgs/LanguageTool/template                 | 24 ++++++++-----------
 5 files changed, 18 insertions(+), 14 deletions(-)
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-cli.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-gui.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-http.sh
 create mode 100644 srcpkgs/LanguageTool/files/languagetool-https.sh

diff --git a/srcpkgs/LanguageTool/files/languagetool-cli.sh b/srcpkgs/LanguageTool/files/languagetool-cli.sh
new file mode 100644
index 000000000000..9c9a0c74ba5d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-cli.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-commandline.jar" "$@"
diff --git a/srcpkgs/LanguageTool/files/languagetool-gui.sh b/srcpkgs/LanguageTool/files/languagetool-gui.sh
new file mode 100644
index 000000000000..62daa3bd2a9d
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-gui.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-http.sh b/srcpkgs/LanguageTool/files/languagetool-http.sh
new file mode 100644
index 000000000000..94efb6b237e3
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-http.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -cp "/usr/share/java/languagetool/languagetool-server.jar" "org.languagetool.server.HTTPServer" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/files/languagetool-https.sh b/srcpkgs/LanguageTool/files/languagetool-https.sh
new file mode 100644
index 000000000000..916eda292312
--- /dev/null
+++ b/srcpkgs/LanguageTool/files/languagetool-https.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec "$JAVA_HOME/bin/java" -jar "/usr/share/java/languagetool/languagetool-server.jar" "$@"
\ No newline at end of file
diff --git a/srcpkgs/LanguageTool/template b/srcpkgs/LanguageTool/template
index 1b422210aa45..0627c34c0de9 100644
--- a/srcpkgs/LanguageTool/template
+++ b/srcpkgs/LanguageTool/template
@@ -1,24 +1,20 @@
 # Template file for 'LanguageTool'
 pkgname=LanguageTool
 version=5.8
-revision=1
+revision=2
 depends="virtual?java-environment"
-short_desc="Checks your writing in more than 20 languages"
+short_desc="Checks your writing in many languages"
 maintainer="Stacy Harper <contact@stacyhaper.net>"
 license="LGPL-2.1-or-later"
 homepage="https://www.languagetool.org/"
-distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip
- https://raw.githubusercontent.com/archlinux/svntogit-community/packages/languagetool/trunk/languagetool.sh"
-checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3
- 009c0a65a978ad11ac097edd4be64688a2c80281b201495eff9ab667c5b0f0fe"
-skip_extraction="languagetool.sh"
+distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip"
+checksum="20913a50eb4568fdc727066eee8aab833f52b626710fc9e0213c3f1098bfdee3"
 
 do_install() {
-	vmkdir usr/bin
-	vmkdir usr/share/java/languagetool
-	vcopy "*.jar" /usr/share/java/languagetool
-	vcopy "libs/*.jar" /usr/share/java/languagetool
-	rm -rf *.jar libs
-	vcopy "$wrksrc" /usr/share/languagetool/
-	vbin ${XBPS_SRCDISTDIR}/${pkgname}-${version}/languagetool.sh languagetool
+	vmkdir usr/share/java/
+	vcopy "$wrksrc" /usr/share/java/languagetool
+	vbin ${FILESDIR}/languagetool-gui.sh languagetool
+	vbin ${FILESDIR}/languagetool-http.sh languagetool-http
+	vbin ${FILESDIR}/languagetool-https.sh languagetool-https
+	vbin ${FILESDIR}/languagetool-cli.sh languagetool-cli
 }

             reply	other threads:[~2023-02-22  0:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  0:33 Ophidiophobia [this message]
2023-02-22  0:42 ` [PR PATCH] [Updated] " Ophidiophobia
2023-02-23 10:47 ` Eloitor
2023-02-23 15:02 ` Ophidiophobia
2023-02-23 15:16 ` Ophidiophobia
2023-05-25  1:53 ` github-actions
2023-06-08  2:04 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42390@inbox.vuxu.org \
    --to=ophidiophobia@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).