Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: languagetool-4.8
@ 2020-01-09 22:29 voidlinux-github
  2020-01-09 22:29 ` [PR PATCH] [Updated] " voidlinux-github
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: voidlinux-github @ 2020-01-09 22:29 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Eluminae/void-packages languagetool
https://github.com/void-linux/void-packages/pull/18154

New package: languagetool-4.8


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

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

From 5623d4dd0b1abcd2d83bbe9f1ebeff05b32dd5d2 Mon Sep 17 00:00:00 2001
From: Reed Wade <reedwade@misterbanal.net>
Date: Thu, 9 Jan 2020 23:30:17 +0100
Subject: [PATCH] New package: languagetool-4.8

---
 srcpkgs/languagetool/files/languagetool | 71 +++++++++++++++++++++++++
 srcpkgs/languagetool/template           | 30 +++++++++++
 2 files changed, 101 insertions(+)
 create mode 100644 srcpkgs/languagetool/files/languagetool
 create mode 100644 srcpkgs/languagetool/template

diff --git a/srcpkgs/languagetool/files/languagetool b/srcpkgs/languagetool/files/languagetool
new file mode 100644
index 00000000000..a2e22c9be8a
--- /dev/null
+++ b/srcpkgs/languagetool/files/languagetool
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+file_present=false
+asked_for_help=false
+start_server=false
+http_server=false
+
+declare -a argv=("$@")
+
+i=0
+for arg in "$@"; do
+  if [[ $arg != -* ]]; then
+    file_present=true
+  fi
+  if [[ $arg == --config* ]]; then
+    start_server=true
+  fi
+  if [[ $arg == --http ]]; then
+    start_server=true
+    http_server=true
+    unset argv[$i]
+  fi
+  if [[ $arg == -h ]]; then
+    asked_for_help=true
+    unset argv[$i]
+  fi
+  if [[ $arg == --help ]]; then
+    asked_for_help=true
+    unset argv[$i]
+  fi
+  ((i++))
+done
+
+CP=/usr/share/languagetool
+for name in /usr/share/java/languagetool/*.jar ; do
+  CP=$CP:$name
+done
+
+CLI_command='org.languagetool.commandline.Main'
+GUI_command='org.languagetool.gui.Main'
+NSRV_command='org.languagetool.server.HTTPServer'
+SSRV_command='org.languagetool.server.HTTPSServer'
+
+if $asked_for_help; then
+  echo "Command-line interface (CLI) help:"
+  "$JAVA_HOME/bin/java" -cp $CP $CLI_command -h | sed "s/java -jar languagetool-commandline.jar/languagetool/"
+  echo
+  echo "Graphical user interface (GUI) help:"
+  "$JAVA_HOME/bin/java" -cp $CP $GUI_command -h | sed "s/java org.languagetool.gui.Main/languagetool/"
+  echo
+  echo "HTTP server help:"
+  "$JAVA_HOME/bin/java" -cp $CP $NSRV_command -h | sed "s/HTTPServer/languagetool --http/"
+  echo
+  echo "HTTPS server help:"
+  "$JAVA_HOME/bin/java" -cp $CP $SSRV_command -h | sed "s/HTTPSServer/languagetool/"
+else
+  if $start_server; then
+    if $http_server; then
+      "$JAVA_HOME/bin/java" -cp $CP $NSRV_command "${argv[@]}"
+    else
+      "$JAVA_HOME/bin/java" -cp $CP $SSRV_command "${argv[@]}"
+    fi
+  else
+    if $file_present; then
+      "$JAVA_HOME/bin/java" -cp $CP $CLI_command "${argv[@]}"
+    else
+      "$JAVA_HOME/bin/java" -cp $CP $GUI_command "${argv[@]}"
+    fi
+  fi
+fi
+
diff --git a/srcpkgs/languagetool/template b/srcpkgs/languagetool/template
new file mode 100644
index 00000000000..e07393c7e03
--- /dev/null
+++ b/srcpkgs/languagetool/template
@@ -0,0 +1,30 @@
+# Template file for 'languagetool'
+pkgname=languagetool
+version=4.8
+revision=4
+archs=noarch
+wrksrc="LanguageTool-${version}"
+makedepends="unzip rsync"
+depends="virtual?java-environment"
+short_desc="Checks your writing in more than 20 languages"
+maintainer="Stacy Harper <contact@stacyhaper.net>"
+license="LGPL"
+homepage="https://www.languagetool.org/"
+distfiles="https://www.languagetool.org/download/LanguageTool-${version}.zip"
+checksum=b4775e88fd90d6389f86023600c4c0e16a9cc00cfe8f093bf1f0c2bbf2a1904d
+
+do_install() {
+	cd "$wrksrc"
+	vmkdir /usr/bin
+	vmkdir /usr/share/java/$pkgname
+	vcopy *.jar /usr/share/java/$pkgname;
+	vcopy libs/*.jar /usr/share/java/$pkgname;
+	rm -rf *.jar libs
+	vcopy "$wrksrc" /usr/share/$pkgname/
+	vbin "$FILESDIR"/languagetool
+
+}
+
+post_install() {
+	vlicense COPYING.txt
+}

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-01-17 20:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-09 22:29 [PR PATCH] New package: languagetool-4.8 voidlinux-github
2020-01-09 22:29 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-09 22:38 ` voidlinux-github
2020-01-10  9:02 ` voidlinux-github
2020-01-10  9:08 ` voidlinux-github
2020-01-10  9:20 ` voidlinux-github
2020-01-10  9:21 ` voidlinux-github
2020-01-10 10:40 ` voidlinux-github
2020-01-10 12:20 ` voidlinux-github
2020-01-10 12:21 ` voidlinux-github
2020-01-11 11:04 ` voidlinux-github
2020-01-11 14:25 ` voidlinux-github
2020-01-11 21:57 ` voidlinux-github
2020-01-11 21:57 ` voidlinux-github
2020-01-11 21:58 ` voidlinux-github
2020-01-13 19:54 ` voidlinux-github
2020-01-13 21:28 ` voidlinux-github
2020-01-13 21:30 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-13 21:31 ` voidlinux-github
2020-01-13 21:33 ` voidlinux-github
2020-01-17 20:00 ` [PR PATCH] [Merged]: " voidlinux-github

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).