mirror of
https://github.com/gromgit/homebrew-fuse.git
synced 2025-12-31 15:02:17 +00:00
63 lines
2.4 KiB
Ruby
63 lines
2.4 KiB
Ruby
require_relative "../require/macfuse"
|
|
|
|
class CryfsMac < Formula
|
|
desc "Encrypts your files so you can safely store them in Dropbox, iCloud, etc."
|
|
homepage "https://www.cryfs.org"
|
|
url "https://github.com/cryfs/cryfs/releases/download/1.0.3/cryfs-1.0.3.tar.xz"
|
|
sha256 "1f30cc406e5c811490ba14174518a797a80442bfff317a2fdfbc5d21205b9dfe"
|
|
license "LGPL-3.0-or-later"
|
|
head "https://github.com/cryfs/cryfs.git", branch: "develop"
|
|
|
|
bottle do
|
|
root_url "https://ghcr.io/v2/gromgit/fuse"
|
|
sha256 cellar: :any, arm64_tahoe: "cf79aa4893fe09f288540e992d1c8065cdab0344ada444ed4099c5e80fd5d910"
|
|
sha256 cellar: :any, arm64_sequoia: "009d5696e71ed22394ff67d5a9e45bfcf605d0d9347f9db7d6316bf336a5e1d7"
|
|
sha256 cellar: :any, arm64_sonoma: "ab98abc9ef34928585d59a7dd93a7d9de1cedadac40b7ab797c515ba06168b44"
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkgconf" => :build
|
|
depends_on "python@3.13" => :build
|
|
depends_on "boost"
|
|
depends_on "curl"
|
|
depends_on "fmt"
|
|
depends_on "libomp"
|
|
depends_on MacfuseRequirement
|
|
depends_on :macos
|
|
depends_on "range-v3"
|
|
depends_on "spdlog"
|
|
|
|
def install
|
|
setup_fuse
|
|
libomp = Formula["libomp"]
|
|
libomp_args = [
|
|
"-DBUILD_TESTING=off",
|
|
"-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{libomp.include}'",
|
|
"-DOpenMP_CXX_LIB_NAMES=omp",
|
|
"-DOpenMP_omp_LIBRARY=#{libomp.lib}/libomp.dylib",
|
|
]
|
|
|
|
system "cmake", "-B", "build", "-S", ".",
|
|
"-DCRYFS_UPDATE_CHECKS=OFF",
|
|
"-DDEPENDENCY_CONFIG=cmake-utils/DependenciesFromLocalSystem.cmake",
|
|
*libomp_args, *std_cmake_args
|
|
system "cmake", "--build", "build"
|
|
system "cmake", "--install", "build"
|
|
end
|
|
|
|
test do
|
|
ENV["CRYFS_FRONTEND"] = "noninteractive"
|
|
|
|
# Test showing help page
|
|
assert_match "CryFS", shell_output("#{bin}/cryfs 2>&1", 10)
|
|
|
|
# Test mounting a filesystem. This command will ultimately fail because homebrew tests
|
|
# don't have the required permissions to mount fuse filesystems, but before that
|
|
# it should display "Mounting filesystem". If that doesn't happen, there's something
|
|
# wrong. For example there was an ABI incompatibility issue between the crypto++ version
|
|
# the cryfs bottle was compiled with and the crypto++ library installed by homebrew to.
|
|
mkdir "basedir"
|
|
mkdir "mountdir"
|
|
assert_match "Operation not permitted", pipe_output("#{bin}/cryfs -f basedir mountdir 2>&1", "password")
|
|
end
|
|
end
|