Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snowball 2.2.0 (new formula) #111779

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems much nicer to ship a shared library. Can we ask upstream if that's something they'd support?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an open issue and PR for it (for Linux, but can update for Mac if accepted).

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