45 lines
1.6 KiB
Ruby
45 lines
1.6 KiB
Ruby
class Gpgme < Formula
|
|
desc "Library access to GnuPG"
|
|
homepage "https://www.gnupg.org/related_software/gpgme/"
|
|
url "https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.15.1.tar.bz2"
|
|
sha256 "eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad"
|
|
license "LGPL-2.1-or-later"
|
|
|
|
livecheck do
|
|
url "https://gnupg.org/ftp/gcrypt/gpgme/"
|
|
regex(/href=.*?gpgme[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "cb5bc3ae542bb57f6eb2ba0ec5e2980f34d43cfbaa1349a77c50b0caba2d2b69"
|
|
sha256 cellar: :any, big_sur: "b7db3dbcd653200ed5f08789582d27f5ada1d70373fc0deaa908167869415362"
|
|
sha256 cellar: :any, catalina: "d2f6e379b0c47d4b62275a588a69bd08fb1c79e153b348c96280f3162548a1e4"
|
|
sha256 cellar: :any, mojave: "4a783a98f9f37a905e5864a628fcbb955ee9f3fa5ddab7c95edad62abe38697f"
|
|
end
|
|
|
|
depends_on "python@3.9" => [:build, :test]
|
|
depends_on "swig" => :build
|
|
depends_on "gnupg"
|
|
depends_on "libassuan"
|
|
depends_on "libgpg-error"
|
|
|
|
def install
|
|
ENV["PYTHON"] = Formula["python@3.9"].opt_bin/"python3"
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}",
|
|
"--enable-static"
|
|
system "make"
|
|
system "make", "install"
|
|
|
|
# avoid triggering mandatory rebuilds of software that hard-codes this path
|
|
inreplace bin/"gpgme-config", prefix, opt_prefix
|
|
end
|
|
|
|
test do
|
|
assert_match version.to_s, shell_output("#{bin}/gpgme-tool --lib-version")
|
|
system Formula["python@3.9"].opt_bin/"python3", "-c", "import gpg; print(gpg.version.versionstr)"
|
|
end
|
|
end
|