diff --git a/Formula/emv-utils.rb b/Formula/emv-utils.rb index f448562..ae608c7 100644 --- a/Formula/emv-utils.rb +++ b/Formula/emv-utils.rb @@ -1,9 +1,9 @@ class EmvUtils < Formula desc "EMV libraries and tools" homepage "https://github.com/openemv/emv-utils" - url "https://github.com/openemv/emv-utils/releases/download/0.1.0/emv-utils-0.1.0-src.tar.gz" - sha256 "7c9b7a9dafe194569b85ed772c22a2297d9b2febeb9779fed7919cf0bade31ba" - license "LGPL-2.1-or-later" + url "https://github.com/openemv/emv-utils/releases/download/0.2.0/emv-utils-0.2.0-src.tar.gz" + sha256 "cf8e84043657a40a7387aaaae6e29c8ae9d6df478b590f033b0aa44b4d23b2c2" + license all_of: ["LGPL-2.1-or-later", "GPL-3.0-or-later"] head "https://github.com/openemv/emv-utils.git", branch: "master" depends_on "cmake" => :build @@ -12,6 +12,7 @@ class EmvUtils < Formula depends_on "iso-codes" depends_on "json-c" depends_on "pcsc-lite" + depends_on "qt@5" depends_on "bash-completion" => :recommended depends_on "doxygen" => :optional @@ -23,9 +24,29 @@ def install system "cmake", "-S", ".", "-B", "build", *std_cmake_args, "-DBUILD_SHARED_LIBS=YES", + "-DBUILD_EMV_DECODE=YES", + "-DBUILD_EMV_TOOL=YES", + "-DBUILD_EMV_VIEWER=YES", + "-DCMAKE_DISABLE_FIND_PACKAGE_Qt6=YES", + "-DBUILD_MACOSX_BUNDLE=YES", "-DCMAKE_INSTALL_RPATH=#{rpath}" + system "cmake", "--build", "build" system "cmake", "--install", "build" + + if OS.mac? + # Create emv-viewer symlink in bin directory + bin.install_symlink prefix/"EMV Viewer.app/Contents/MacOS/EMV Viewer" => "emv-viewer" + end + end + + def caveats + return unless OS.mac? + + <<~EOS + For EMV Viewer to appear in Launchpad, do this: + ln -s $(brew --prefix emv-utils)/EMV\\ Viewer.app /Applications/ + EOS end test do