From fd8a877bfba84f62ff015c13070dff81cd89d516 Mon Sep 17 00:00:00 2001 From: Xavier Lacoste Date: Tue, 9 Dec 2014 10:31:06 +0100 Subject: Formula for queequeg small grammar checker Closes #34819. Signed-off-by: Mike McQuaid --- Library/Formula/queequeg.rb | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Library/Formula/queequeg.rb (limited to 'Library/Formula') diff --git a/Library/Formula/queequeg.rb b/Library/Formula/queequeg.rb new file mode 100644 index 000000000..bd3a82007 --- /dev/null +++ b/Library/Formula/queequeg.rb @@ -0,0 +1,35 @@ +require "formula" + +class Queequeg < Formula + homepage "http://queequeg.sourceforge.net/" + url "https://downloads.sourceforge.net/project/queequeg/queequeg/queequeg-0.91/queequeg-0.91.tar.gz" + sha1 "e0ceae717a297ee866e38ae7fd10c216df1232e9" + + depends_on :python if MacOS.version <= :snow_leopard + depends_on "wordnet" + + def install + # Build the dictionary + system "make", "dict", "WORDNETDICT=#{Formula["wordnet"].opt_prefix}/dict" + + # Install python files and dictionary into libexec + install_list = ["abstfilter.py", "constraint.py", "convdict.py", + "dictionary.py", "document.py", + "grammarerror.py", "markupbase_rev.py", "output.py", + "postagfix.py", "pstring.py", "qq", "regpat.py", + "sentence.py", "sgmllib_rev.py", "texparser.py", "unification.py"] + libexec.install install_list + if File.exist? "dict.cdb" + libexec.install "dict.cdb" + else + libexec.install "dict.txt" + end + # Write a wrapper for qq + bin.write_exec_script "#{libexec}/qq" + end + + test do + (testpath/"filename").write "This is a test." + system "#{bin}/qq", "#{testpath}/filename" + end +end -- cgit v1.2.3