freeling 4.1
depend on cmake at build time remove Autotools dependencies bump vendored Boost to 1.67.0 Closes #26760. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
53a2a1c97f
commit
2e6c6aae73
1 changed files with 18 additions and 20 deletions
|
@ -1,9 +1,8 @@
|
|||
class Freeling < Formula
|
||||
desc "Suite of language analyzers"
|
||||
homepage "http://nlp.lsi.upc.edu/freeling/"
|
||||
url "https://github.com/TALP-UPC/FreeLing/releases/download/4.0/FreeLing-4.0.tar.gz"
|
||||
sha256 "c79d21c5af215105ba16eb69ee75b589bf7d41abce86feaa40757513e33c6ecf"
|
||||
revision 9
|
||||
url "https://github.com/TALP-UPC/FreeLing/releases/download/4.1/FreeLing-4.1.tar.gz"
|
||||
sha256 "ccb3322db6851075c9419bb5e472aa6b2e32cc7e9fa01981cff49ea3b212247e"
|
||||
|
||||
bottle do
|
||||
sha256 "ba96339622bec10fe7b19d8898cc323c8d41a72efd35d5154d6bf7d55b5694ea" => :high_sierra
|
||||
|
@ -11,16 +10,14 @@ class Freeling < Formula
|
|||
sha256 "a4ac55575f77608ec3d0f203a8bd68b4337c21fc22810664568091075104158d" => :el_capitan
|
||||
end
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "cmake" => :build
|
||||
depends_on "icu4c"
|
||||
|
||||
conflicts_with "hunspell", :because => "both install 'analyze' binary"
|
||||
|
||||
resource "boost" do
|
||||
url "https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2"
|
||||
sha256 "7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332"
|
||||
url "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2"
|
||||
sha256 "2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba"
|
||||
end
|
||||
|
||||
def install
|
||||
|
@ -35,7 +32,7 @@ class Freeling < Formula
|
|||
--prefix=#{libexec}/boost
|
||||
--libdir=#{libexec}/boost/lib
|
||||
--with-icu=#{Formula["icu4c"].opt_prefix}
|
||||
--with-libraries=program_options,regex,system,thread
|
||||
--with-libraries=atomic,chrono,date_time,filesystem,program_options,regex,system,thread
|
||||
]
|
||||
|
||||
args = %W[
|
||||
|
@ -67,18 +64,19 @@ class Freeling < Formula
|
|||
MachO::Tools.change_dylib_id(dylib.to_s, dylib.to_s)
|
||||
end
|
||||
|
||||
icu4c = Formula["icu4c"]
|
||||
libtool = Formula["libtool"]
|
||||
ENV.append "LDFLAGS", "-L#{libtool.lib}"
|
||||
ENV.append "LDFLAGS", "-L#{icu4c.lib}"
|
||||
ENV.append "LDFLAGS", "-L#{libexec}/boost/lib"
|
||||
ENV.append "CPPFLAGS", "-I#{libtool.include}"
|
||||
ENV.append "CPPFLAGS", "-I#{icu4c.include}"
|
||||
ENV.append "CPPFLAGS", "-I#{libexec}/boost/include"
|
||||
%w[chrono filesystem thread].each do |library|
|
||||
macho = MachO.open("#{libexec}/boost/lib/libboost_#{library}-mt.dylib")
|
||||
macho.change_dylib("libboost_system-mt.dylib",
|
||||
"#{libexec}/boost/lib/libboost_system-mt.dylib")
|
||||
macho.write!
|
||||
end
|
||||
|
||||
system "autoreconf", "--install"
|
||||
system "./configure", "--prefix=#{prefix}", "--enable-boost-locale"
|
||||
system "make", "install"
|
||||
mkdir "build" do
|
||||
system "cmake", "..", "-DBoost_INCLUDE_DIR=#{libexec}/boost/include",
|
||||
"-DBoost_LIBRARY_DIR_RELEASE=#{libexec}/boost/lib",
|
||||
*std_cmake_args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
libexec.install "#{bin}/fl_initialize"
|
||||
inreplace "#{bin}/analyze",
|
||||
|
|
Loading…
Reference in a new issue