diff options
| author | Martin Gruner | 2014-10-18 20:32:31 +0200 |
|---|---|---|
| committer | Mike McQuaid | 2014-10-21 12:17:22 +0100 |
| commit | f5757a856a64bc065d138119f499a8ef29e7dd9c (patch) | |
| tree | e38fe0671a9119acca457b3aafd3ed8a889a959c /Library/Formula | |
| parent | 91a3aea85b0e51ed65cc0d1ec49019b4822eb5f2 (diff) | |
| download | homebrew-f5757a856a64bc065d138119f499a8ef29e7dd9c.tar.bz2 | |
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.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/sword.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Library/Formula/sword.rb b/Library/Formula/sword.rb new file mode 100644 index 000000000..47cfecbbf --- /dev/null +++ b/Library/Formula/sword.rb @@ -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 |
