homebrew-core/Formula/p11-kit.rb

50 lines
1.5 KiB
Ruby

class P11Kit < Formula
desc "Library to load and enumerate PKCS#11 modules"
homepage "https://p11-glue.freedesktop.org"
url "https://github.com/p11-glue/p11-kit/releases/download/0.23.20/p11-kit-0.23.20.tar.xz"
sha256 "14d86024c3dfd6b967d9bc0b4ec7b2973014fe7423481f4d230a1a63b8aa6104"
revision 1
bottle do
sha256 "f9d23713a5fbd8e1eea89bcc9ab8da6792e1f7e66553da0e307ae8437a7fd950" => :catalina
sha256 "72d092bf908d2623a9be13c716fd8ca04734382bd42b3ab5dd8bf2b1ab2dc00b" => :mojave
sha256 "bf2e9dc6ae194c9d39d079bbd7714f4dda32b2800e37c67a2a86409aa69771bd" => :high_sierra
end
head do
url "https://github.com/p11-glue/p11-kit.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext" => :build
depends_on "libtool" => :build
end
depends_on "pkg-config" => :build
depends_on "libffi"
def install
# https://bugs.freedesktop.org/show_bug.cgi?id=91602#c1
ENV["FAKED_MODE"] = "1"
if build.head?
ENV["NOCONFIGURE"] = "1"
system "./autogen.sh"
end
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--disable-trust-module",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}",
"--with-module-config=#{etc}/pkcs11/modules",
"--without-libtasn1"
system "make"
system "make", "install"
end
test do
system "#{bin}/p11-kit", "list-modules"
end
end