46 lines
1.5 KiB
Ruby
46 lines
1.5 KiB
Ruby
class Freeling < Formula
|
|
desc "Suite of language analyzers"
|
|
homepage "http://nlp.lsi.upc.edu/freeling/"
|
|
url "http://devel.cpl.upc.edu/freeling/downloads/32"
|
|
version "3.1"
|
|
sha256 "e98471ceb3f58afbe70369584d8d316323d13fcc51d09b2fd7f431a3220982ba"
|
|
revision 8
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "0ba37b74a74522ccd73ac6759ff5a4f082c4113ff84a98f0faec52394fc823a8" => :el_capitan
|
|
sha256 "4ff37df989fd3f9b19f1585749d7a3f62fd0a61be41c68ccb4cfc143d3270196" => :yosemite
|
|
sha256 "2ce0f9a11180f73f40a2bd42b8528713fc38d255d248ec58ae4b07203275e5f2" => :mavericks
|
|
end
|
|
|
|
depends_on "libtool" => :build
|
|
depends_on "boost" => "with-icu4c"
|
|
depends_on "icu4c"
|
|
|
|
conflicts_with "hunspell", :because => "both install 'analyze' binary"
|
|
|
|
def install
|
|
icu4c = Formula["icu4c"]
|
|
libtool = Formula["libtool"]
|
|
ENV.append "LDFLAGS", "-L#{libtool.lib}"
|
|
ENV.append "LDFLAGS", "-L#{icu4c.lib}"
|
|
ENV.append "CPPFLAGS", "-I#{libtool.include}"
|
|
ENV.append "CPPFLAGS", "-I#{icu4c.include}"
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--enable-boost-locale"
|
|
system "make", "install"
|
|
|
|
libexec.install "#{bin}/fl_initialize"
|
|
inreplace "#{bin}/analyze",
|
|
". $(cd $(dirname $0) && echo $PWD)/fl_initialize",
|
|
". #{libexec}/fl_initialize"
|
|
end
|
|
|
|
test do
|
|
expected = <<-EOS.undent
|
|
Hello hello NN 1
|
|
world world NN 1
|
|
EOS
|
|
assert_equal expected, pipe_output("#{bin}/analyze -f #{pkgshare}/config/en.cfg", "Hello world").chomp
|
|
end
|
|
end
|