From 584bad000d228b55b1e6fcaf256362ab828bfe92 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 27 Dec 2024 13:49:30 +0000 Subject: [PATCH 1/2] apache-opennlp 2.5.2 apache-opennlp: add build patch Signed-off-by: Rui Chen --- Formula/a/apache-opennlp.rb | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Formula/a/apache-opennlp.rb b/Formula/a/apache-opennlp.rb index 389967d074cf8..c4bb192c85a11 100644 --- a/Formula/a/apache-opennlp.rb +++ b/Formula/a/apache-opennlp.rb @@ -1,9 +1,9 @@ class ApacheOpennlp < Formula desc "Machine learning toolkit for processing natural language text" homepage "https://opennlp.apache.org/" - url "https://www.apache.org/dyn/closer.lua?path=opennlp/opennlp-2.5.1/apache-opennlp-2.5.1-bin.tar.gz" - mirror "https://archive.apache.org/dist/opennlp/opennlp-2.5.1/apache-opennlp-2.5.1-bin.tar.gz" - sha256 "2b47d41e2b45073fd785bb65923623d877f0f605cb390eee1470964772a4191a" + url "https://www.apache.org/dyn/closer.lua?path=opennlp/opennlp-2.5.2/apache-opennlp-2.5.2-bin.tar.gz" + mirror "https://archive.apache.org/dist/opennlp/opennlp-2.5.2/apache-opennlp-2.5.2-bin.tar.gz" + sha256 "d515781b1444038dad6433ee8414f535bac3b244f126b3b5479a5b021bf22246" license "Apache-2.0" bottle do @@ -12,7 +12,13 @@ class ApacheOpennlp < Formula depends_on "openjdk" + # build patch to remove quote for `$HEAP`, upstream pr ref, https://github.com/apache/opennlp/pull/734 + patch :DATA + def install + # Remove Windows scripts + rm(Dir["bin/*.bat"]) + libexec.install Dir["*"] (bin/"opennlp").write_env_script libexec/"bin/opennlp", JAVA_HOME: Formula["openjdk"].opt_prefix, OPENNLP_HOME: libexec @@ -22,3 +28,15 @@ def install assert_equal "Hello , friends", pipe_output("#{bin}/opennlp SimpleTokenizer", "Hello, friends").lines.first.chomp end end + +__END__ +diff --git a/bin/opennlp b/bin/opennlp +index 8375e2d..c1c2984 100755 +--- a/bin/opennlp ++++ b/bin/opennlp +@@ -58,4 +58,4 @@ if [ -n "$JAVA_HEAP" ] ; then + HEAP="-Xmx$JAVA_HEAP" + fi + +-$JAVACMD "$HEAP" -Dlog4j.configurationFile="$OPENNLP_HOME/conf/log4j2.xml" -cp "$CLASSPATH" opennlp.tools.cmdline.CLI "$@" ++$JAVACMD $HEAP -Dlog4j.configurationFile="$OPENNLP_HOME/conf/log4j2.xml" -cp "$CLASSPATH" opennlp.tools.cmdline.CLI "$@" From fae226a6b73a4dc7da47481dd2947f67f85dd090 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Fri, 27 Dec 2024 22:37:34 +0000 Subject: [PATCH 2/2] apache-opennlp: update 2.5.2 bottle. --- Formula/a/apache-opennlp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/a/apache-opennlp.rb b/Formula/a/apache-opennlp.rb index c4bb192c85a11..611b8f19a306a 100644 --- a/Formula/a/apache-opennlp.rb +++ b/Formula/a/apache-opennlp.rb @@ -7,7 +7,7 @@ class ApacheOpennlp < Formula license "Apache-2.0" bottle do - sha256 cellar: :any_skip_relocation, all: "0b2ff41d83c0c8195c3dd5fb365911a94b0ae5f8333f541502cff01a857202b2" + sha256 cellar: :any_skip_relocation, all: "6af9c46ca1928c9e35c8797e91e2fb853549a982447902642fec5ee99975fa9d" end depends_on "openjdk"