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.7/p11-kit-0.23.7.tar.gz"
sha256 "988e7c86f2641b36702503481292ef0686e6b1c39d80b215699b6dbf1024be41"
bottle do
sha256 "c1548c243f952524bf40d5f44d109126d9603108341485babe6d122f328b3411" => :sierra
sha256 "f216aa509c09033f070f97312fc05ff7d9aa25b5b6d9f55b4594782fab84c568" => :el_capitan
sha256 "6c6ef332aabb74204f722bcb2bb171ba58dc2e86a029361c75b7d6576d34a85d" => :yosemite
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 "libffi"
depends_on "pkg-config" => :build
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", "check"
system "make", "install"
end
test do
system "#{bin}/p11-kit", "list-modules"
end
end