2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-19 09:44:26 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Clucene < Formula
|
2012-08-27 10:49:08 +00:00
|
|
|
homepage 'http://clucene.sourceforge.net'
|
2012-08-27 05:17:25 +00:00
|
|
|
|
2014-03-17 18:34:27 +00:00
|
|
|
stable do
|
|
|
|
url "https://downloads.sourceforge.net/project/clucene/clucene-core-stable/0.9.21b/clucene-core-0.9.21b.tar.bz2"
|
|
|
|
sha1 "8bc505b64f82723c2dc901036cb0607500870973"
|
2012-09-26 17:13:35 +00:00
|
|
|
|
2014-03-17 18:34:27 +00:00
|
|
|
# Fix libpthread dependencies in OS X 10.9
|
|
|
|
# Based on MacPorts patches: http://trac.macports.org/ticket/40899
|
|
|
|
# Reported upstream: http://sourceforge.net/p/clucene/bugs/219/
|
|
|
|
if MacOS.version == :mavericks
|
|
|
|
patch :p0 do
|
|
|
|
url "https://gist.github.com/tlvince/7934499/raw/d0859996dbda8f4cf643d091ae6b491f0a64da59/CLucene-LuceneThreads.h.diff"
|
|
|
|
sha1 "59e672e70d053d79d5b19c422945299ba66f2562"
|
|
|
|
end
|
|
|
|
|
|
|
|
patch :p0 do
|
|
|
|
url "https://gist.github.com/tlvince/7935339/raw/fd78b1ada278eaf1904e1437efa0f2a1265041a9/CLucene-config-repl_tchar.h.diff"
|
|
|
|
sha1 "e6aee206577fc3b751652db6774d32e923b50b0b"
|
2013-12-14 02:09:31 +00:00
|
|
|
end
|
2013-12-10 08:48:04 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-03-17 18:34:27 +00:00
|
|
|
head do
|
|
|
|
url "git://clucene.git.sourceforge.net/gitroot/clucene/clucene"
|
|
|
|
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
patch do
|
|
|
|
url "https://gist.github.com/lfranchi/7954811/raw/828176c01a8f2c1c11eff43bf6773242955dabab/CLucene-HEAD-mavericks.patch"
|
|
|
|
sha1 "43f89924e85f9df50bf32032f05de153237162f3"
|
|
|
|
end if MacOS.version == :mavericks
|
|
|
|
end
|
|
|
|
|
2009-09-19 09:44:26 +00:00
|
|
|
def install
|
2012-08-27 05:17:25 +00:00
|
|
|
if build.head?
|
2012-05-22 21:37:04 +00:00
|
|
|
system "cmake", ".", *std_cmake_args
|
2011-05-11 21:48:58 +00:00
|
|
|
else
|
2012-02-22 05:12:27 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2011-05-11 21:48:58 +00:00
|
|
|
end
|
2011-11-22 04:03:04 +00:00
|
|
|
|
2012-03-11 02:33:13 +00:00
|
|
|
# Serialize the install step. See:
|
2013-12-14 18:13:11 +00:00
|
|
|
# https://github.com/Homebrew/homebrew/issues/8712
|
2011-11-22 04:03:04 +00:00
|
|
|
ENV.j1
|
2009-09-19 09:44:26 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|