aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/qca.rb
diff options
context:
space:
mode:
authorLarry Shaffer2014-11-29 11:02:45 -0700
committerMike McQuaid2014-11-30 17:09:55 +0000
commit07a244cccf5155f67db89849f6a6f4475fcbb716 (patch)
tree999c5a1d1c08decf44e69bf05b141570a794bf93 /Library/Formula/qca.rb
parent69efe451de7521d4736dc65f16b5cc381c1f2eef (diff)
downloadhomebrew-07a244cccf5155f67db89849f6a6f4475fcbb716.tar.bz2
qca: add options for head, qt5, api docs and building all plugins
Closes #34530. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/qca.rb')
-rw-r--r--Library/Formula/qca.rb43
1 files changed, 38 insertions, 5 deletions
diff --git a/Library/Formula/qca.rb b/Library/Formula/qca.rb
index d02e55a61..58b1c4d5d 100644
--- a/Library/Formula/qca.rb
+++ b/Library/Formula/qca.rb
@@ -5,21 +5,54 @@ class Qca < Formula
url "http://delta.affinix.com/download/qca/2.0/qca-2.1.0.tar.gz"
sha1 "2b582b3ccc7e6098cd14d6f52a829ae1539e9cc8"
+ head "git://anongit.kde.org/qca.git", :branch => "master"
+
bottle do
sha1 "3ff5e09bb690122d807b48470cf1bbafcca89b41" => :yosemite
sha1 "f01d8cbd41c97068185af2f4c6efdec8ff0c6ce7" => :mavericks
sha1 "4638b43c0ce83a2cccc64d678c7eefffd1844ba3" => :mountain_lion
end
+ option "with-api-docs", "Build API documentation"
+
depends_on "cmake" => :build
depends_on "pkg-config" => :build
- depends_on "qt"
- depends_on "openssl"
+ depends_on "qt" => :recommended
+ depends_on "qt5" => :optional
+
+ # Plugins (QCA needs at least one plugin to do anything useful)
+ depends_on "openssl" # qca-ossl
+ depends_on "botan" => :optional # qca-botan
+ depends_on "libgcrypt" => :optional # qca-gcrypt
+ depends_on "gnupg" => :optional # qca-gnupg
+ depends_on "nss" => :optional # qca-nss
+ depends_on "pkcs11-helper" => :optional # qca-pkcs11
+
+ if build.with? "api-docs"
+ depends_on "graphviz" => :build
+ depends_on "doxygen" => [:build, "with-dot"]
+ end
def install
- mkdir "build" do
- system "cmake", "..", *std_cmake_args
- system "make", "install"
+ odie "Qt dependency must be defined" if build.without?("qt") && build.without?("qt5")
+
+ args = std_cmake_args
+ args << "-DQT4_BUILD=#{build.with?("qt5") ? "OFF" : "ON"}"
+ args << "-DBUILD_TESTS=OFF"
+
+ # Plugins (qca-ossl, qca-cyrus-sasl, qca-logger, qca-softstore always built)
+ args << "-DWITH_botan_PLUGIN=#{build.with?("botan") ? "YES" : "NO"}"
+ args << "-DWITH_gcrypt_PLUGIN=#{build.with?("libgcrypt") ? "YES" : "NO"}"
+ args << "-DWITH_gnupg_PLUGIN=#{build.with?("gnupg") ? "YES" : "NO"}"
+ args << "-DWITH_nss_PLUGIN=#{build.with?("nss") ? "YES" : "NO"}"
+ args << "-DWITH_pkcs11_PLUGIN=#{build.with?("pkcs11-helper") ? "YES" : "NO"}"
+
+ system "cmake", ".", *args
+ system "make", "install"
+
+ if build.with? "api-docs"
+ system "make", "doc"
+ doc.install "apidocs/html"
end
end