Skip to content

Commit

Permalink
Update formula for emv-utils-0.2.0
Browse files Browse the repository at this point in the history
* Update license details
* Depend on qt@5 to build emv-viewer
* Add caveat for EMV Viewer to appear in Launchpad
  • Loading branch information
leonlynch committed Nov 24, 2024
1 parent bdfd7ad commit 9737202
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions Formula/emv-utils.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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/

Check failure on line 48 in Formula/emv-utils.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Style/RedundantStringEscape: Redundant escape of inside string literal.

Check failure on line 48 in Formula/emv-utils.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-15)

Style/RedundantStringEscape: Redundant escape of inside string literal.
EOS
end

test do
Expand Down

0 comments on commit 9737202

Please sign in to comment.