-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to build with the OpenSSL backend.
- Loading branch information
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,20 @@ class Rnp < Formula | |
license all_of: ["MIT", "BSD-2-Clause", "BSD-3-Clause"] | ||
head "https://github.com/rnpgp/rnp.git", branch: "main" | ||
|
||
option "with-botan", "Use Botan as the cryptographic backend (default)" | ||
option "with-openssl", "Use OpenSSL as the cryptographic backend" | ||
|
||
depends_on "cmake" => :build | ||
depends_on "botan" | ||
depends_on "json-c" | ||
depends_on "botan" => :recommended | ||
depends_on "openssl" => :optional | ||
|
||
def install | ||
Check warning on line 19 in Formula/rnp.rb GitHub Actions / test-bot (macos-latest)`brew install --verbose --build-bottle rnpgp/rnp/rnp` failed on macOS Sonoma (14) on Apple Silicon!
|
||
args = std_cmake_args | ||
# Botan is used by default | ||
args << "-DCRYPTO_BACKEND=openssl" if build.with? "openssl" | ||
system "cmake", "-S", ".", "-B", "build", | ||
"-DBUILD_TESTING=OFF", *std_cmake_args | ||
"-DBUILD_TESTING=OFF", *args | ||
system "cmake", "--build", "build" | ||
system "cmake", "--install", "build" | ||
end | ||
|