2012-07-30 10:19:46 +00:00
|
|
|
class Freeling < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Suite of language analyzers"
|
2014-08-07 18:20:21 +00:00
|
|
|
homepage "http://nlp.lsi.upc.edu/freeling/"
|
|
|
|
url "http://devel.cpl.upc.edu/freeling/downloads/32"
|
|
|
|
version "3.1"
|
2015-05-03 18:30:18 +00:00
|
|
|
sha256 "e98471ceb3f58afbe70369584d8d316323d13fcc51d09b2fd7f431a3220982ba"
|
|
|
|
revision 4
|
2012-07-30 10:19:46 +00:00
|
|
|
|
2014-08-08 04:12:13 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-05-10 02:34:35 +00:00
|
|
|
revision 1
|
2015-09-24 10:57:37 +00:00
|
|
|
sha256 "4c101b5eb04c7ab1fa08202f17b836eb9481070d030dd72b5e25bbf9be6904c6" => :el_capitan
|
2015-05-10 02:34:35 +00:00
|
|
|
sha256 "b921001f29e09759d08fa04ef080117234e6c7a5f0dfd62064eb18b82ae61a42" => :yosemite
|
|
|
|
sha256 "1b5ec2f41b3e8f760ecbdc20260d10464f242c7376eed10d7e9c2b07870d19c5" => :mavericks
|
|
|
|
sha256 "f32136a520a0991dfb0e8dc4f98685c389bc886360995d40babad96a744f8c79" => :mountain_lion
|
2014-08-08 04:12:13 +00:00
|
|
|
end
|
|
|
|
|
2014-11-14 20:35:07 +00:00
|
|
|
depends_on "boost" => "with-icu4c"
|
2015-05-03 18:30:18 +00:00
|
|
|
depends_on "icu4c"
|
2014-08-07 18:20:21 +00:00
|
|
|
depends_on "libtool" => :build
|
2012-07-30 10:19:46 +00:00
|
|
|
|
|
|
|
def install
|
2014-08-07 18:20:21 +00:00
|
|
|
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}"
|
2012-07-30 10:19:46 +00:00
|
|
|
|
2013-11-06 23:12:36 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--enable-boost-locale"
|
2012-07-30 10:19:46 +00:00
|
|
|
|
2014-08-07 18:20:21 +00:00
|
|
|
system "make", "install"
|
2014-08-07 18:35:27 +00:00
|
|
|
|
|
|
|
libexec.install "#{bin}/fl_initialize"
|
|
|
|
inreplace "#{bin}/analyze",
|
|
|
|
". $(cd $(dirname $0) && echo $PWD)/fl_initialize",
|
|
|
|
". #{libexec}/fl_initialize"
|
2012-07-30 10:19:46 +00:00
|
|
|
end
|
|
|
|
|
2014-02-23 21:31:41 +00:00
|
|
|
test do
|
2015-05-03 18:30:18 +00:00
|
|
|
expected = <<-EOS.undent
|
|
|
|
Hello hello NN 1
|
|
|
|
world world NN 1
|
|
|
|
EOS
|
|
|
|
assert_equal expected, pipe_output("#{bin}/analyze -f #{share}/freeling/config/en.cfg", "Hello world").chomp
|
2012-07-30 10:19:46 +00:00
|
|
|
end
|
|
|
|
end
|