sword 1.7.3 (new formula)

Sword is a mature programming library for working with biblical and
related tests that is used by different bible readers such as Xiphos
and BibleTime. This commit adds a first version of a formula for sword
to homebrew.
This commit is contained in:
Martin Gruner 2014-10-18 20:32:31 +02:00 committed by Mike McQuaid
parent 21c33b33f6
commit 67e1d6305d

44
Formula/sword.rb Normal file
View file

@ -0,0 +1,44 @@
require "formula"
class Sword < Formula
homepage "http://www.crosswire.org"
url "ftp://ftp.crosswire.org/pub/sword/source/v1.7/sword-1.7.3.tar.gz"
sha1 "6ecac6364aa098e150cf8851fd8f97d48df21a34"
# Activates optional unicode support in sword.
depends_on "icu4c" => :optional
# Activates optional clucene based text searching capabilities in sword.
depends_on "clucene" => :optional
def install
args = [
"--prefix=#{prefix}",
"--disable-debug",
"--disable-profile",
"--disable-tests",
"--with-curl", # use system curl
]
if build.with? "icu4c"
args << "--with-icu"
else
args << "--without-icu"
end
if build.with? "clucene"
args << "--with-clucene"
else
args << "--without-clucene"
end
system "./configure", *args
system "make", "install"
end
test do
# This will call sword's module manager to list remote sources.
# It should just demonstrate that the lib was correctly installed
# and can be used by frontends like installmgr.
system "#{bin}/installmgr", "-s"
end
end