Skip to content

Commit

Permalink
Add option to build with the OpenSSL backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed May 17, 2024
1 parent 8489fd9 commit 27dcc7f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Formula/rnp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

View workflow job for this annotation

GitHub Actions / test-bot (macos-latest)

`brew install --verbose --build-bottle rnpgp/rnp/rnp` failed on macOS Sonoma (14) on Apple Silicon!

==> Fetching rnpgp/rnp/rnp ==> Downloading https://github.com/rnpgp/rnp/releases/download/v0.17.1/rnp-v0.17.1.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/b2ae80cc71b559dce1ce7f52ec063ab856c5069753987e4abf05d2d248237cb7--rnp-v0.17.1.tar.gz ==> Verifying checksum for 'b2ae80cc71b559dce1ce7f52ec063ab856c5069753987e4abf05d2d248237cb7--rnp-v0.17.1.tar.gz' ==> Installing rnp from rnpgp/rnp /usr/bin/env tar --extract --no-same-owner --file /Users/runner/Library/Caches/Homebrew/downloads/b2ae80cc71b559dce1ce7f52ec063ab856c5069753987e4abf05d2d248237cb7--rnp-v0.17.1.tar.gz --directory /private/tmp/homebrew-unpack20240517-8593-7jc0ru /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240517-8593-7jc0ru/rnp-v0.17.1/. /private/tmp/rnp-20240517-8593-fvyn9o/rnp-v0.17.1 ==> cmake -S . -B build -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/rnp/0.17.1 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -- Found version.txt with 0.17.1 -- Found Git: /opt/homebrew/Library/Homebrew/shims/mac/super/git (found version "2.39.3 (Apple Git-145)") -- Found no annotated tags. -- RNP_VERSION: 0.17.1 -- RNP_VERSION_NCOMMITS: 0 -- RNP_VERSION_GIT_REV: 0 -- RNP_VERSION_IS_DIRTY: FALSE -- RNP_VERSION_COMMIT_TIMESTAMP: 0 -- RNP_VERSION_SUFFIX: -- RNP_VERSION_FULL: 0.17.1 -- The C compiler identification is AppleClang 15.0.0.15000040 -- The CXX compiler identification is AppleClang 15.0.0.15000040 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /opt/homebrew/Library/Homebrew/shims/mac/super/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /opt/homebrew/Library/Homebrew/shims/mac/super/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning at cmake/Modules/AdocMan.cmake:51 (message): AsciiDoc processor not found, man pages will not be generated. Install asciidoctor or use the CMAKE_PROGRAM_PATH variable. Call Stack (most recent call first): CMakeLists.txt:176 (include) -- Found version.txt with 0.8.7 -- Found no annotated tags. -- SEXPP_VERSION: 0.8.7 -- SEXPP_VERSION_NCOMMITS: 0 -- SEXPP_VERSION_GIT_REV: 0 -- SEXPP_VERSION_IS_DIRTY: FALSE -- SEXPP_VERSION_COMMIT_TIMESTAMP: 0 -- SEXPP_MAJOR_VERSION: 0 -- SEXPP_VERSION_SUFFIX: -- SEXPP_VERSION_FULL: 0.8.7 -- Building STATIC library -- Building Release configuration -- Found BZip2: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libbz2.tbd (found version "1.0.8") -- Looking for BZ2_bzCompressInit -- Looking for BZ2_bzCompressInit - found -- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libz.tbd (found version "1.2.12") -- Found JSON-C: /opt/homebrew/lib/libjson-c.dylib (found suitable version "0.17", minimum required is "0.11") CMake Error at /opt/homebrew/Cellar/cmake/3.29.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Botan (missing: BOTAN_LIBRARY BOTAN_INCLUDE_DIR) (Required is at least version "2.14.0") Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.29.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) cmake/Modules/FindBotan.cmake:138 (find_package_handle_standard_args) src/lib/CMakeLists.txt:37 (find_package) -- Configuring incomplete, errors occurred! ==> Formula Tap: rnpgp/rnp Path: /opt/homebrew/Library/Taps/rnpgp/homebrew-rnp/Formula/rnp.rb ==> Configuration HOMEBREW_VERSION: 4.3.0-69-g3a79620 ORIGIN: https://github.com/Homebrew/brew HEAD: 3a796203d8f3c57b7b2215d78eae852cc8c0af85 Last commit: 2 hours ago Core tap HEAD: 006b334bb8cf2f972a5ed6fbd5c94594b410f934 Core tap last commit: 3 da
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
Expand Down

0 comments on commit 27dcc7f

Please sign in to comment.