diff --git a/Formula/pkcs11-helper.rb b/Formula/pkcs11-helper.rb index 5e0359d1eb..a1f2615f3c 100644 --- a/Formula/pkcs11-helper.rb +++ b/Formula/pkcs11-helper.rb @@ -1,8 +1,8 @@ class Pkcs11Helper < Formula desc "Library to simplify the interaction with PKCS#11" homepage "https://github.com/OpenSC/OpenSC/wiki/pkcs11-helper" - url "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.25/pkcs11-helper-1.25.tar.bz2" - sha256 "01591ff73a21a79935fb03ba511f439d603b3048759702a09207536b30a1fe0e" + url "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-1.25.1/pkcs11-helper-1.25.1.tar.bz2" + sha256 "10dd8a1dbcf41ece051fdc3e9642b8c8111fe2c524cb966c0870ef3413c75a77" head "https://github.com/OpenSC/pkcs11-helper.git" bottle do @@ -35,4 +35,20 @@ class Pkcs11Helper < Formula system "./configure", *args system "make", "install" end + + test do + (testpath/"test.c").write <<~EOS + #include + #include + #include + + int main() { + printf("Version: %08x", pkcs11h_getVersion ()); + return 0; + } + EOS + system ENV.cc, testpath/"test.c", "-I#{include}", "-L#{lib}", + "-lpkcs11-helper", "-o", "test" + system "./test" + end end