Skip to content

Commit

Permalink
snowball 2.2.0 (new formula)
Browse files Browse the repository at this point in the history
Closes #111779.

Signed-off-by: Carlo Cabrera <[email protected]>
Signed-off-by: Rui Chen <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
ankane authored and BrewTestBot committed Sep 28, 2022
1 parent 00a4349 commit 47f9bb3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Formula/snowball.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Snowball < Formula
desc "Stemming algorithms"
homepage "https://snowballstem.org"
url "https://github.com/snowballstem/snowball/archive/refs/tags/v2.2.0.tar.gz"
sha256 "425cdb5fba13a01db59a1713780f0662e984204f402d3dae1525bda9e6d30f1a"
license "BSD-3-Clause"

def install
system "make"

lib.install "libstemmer.a"
include.install Dir["include/*"]
pkgshare.install "examples"
end

test do
(testpath/"test.txt").write("connection")
cp pkgshare/"examples/stemwords.c", testpath
system ENV.cc, "stemwords.c", "-L#{lib}", "-lstemmer", "-o", "test"
assert_equal "connect\n", shell_output("./test -i test.txt")
end
end

0 comments on commit 47f9bb3

Please sign in to comment.