Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions Formula/cryfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class Cryfs < Formula
homepage "https://www.cryfs.org"
url "https://github.com/cryfs/cryfs/releases/download/0.9.9/cryfs-0.9.9.tar.xz"
sha256 "aa8d90bb4c821cf8347f0f4cbc5f68a1e0f4eb461ffd8f1ee093c4d37eac2908"
head "https://github.com/cryfs/cryfs.git", :branch => "develop"

bottle do
cellar :any
Expand All @@ -13,6 +12,11 @@ class Cryfs < Formula
sha256 "2fab8415b94e7b2f782ec642e2e4fb0ce345524f5fd014cc21d14b2b410c8635" => :el_capitan
end

head do
url "https://github.com/cryfs/cryfs.git", :branch => "develop", :shallow => false
depends_on "libomp"
end

depends_on "cmake" => :build
depends_on "boost"
depends_on "cryptopp"
Expand All @@ -22,7 +26,22 @@ class Cryfs < Formula
needs :cxx11

def install
system "cmake", ".", "-DBUILD_TESTING=off", *std_cmake_args
configure_args = [
"-DBUILD_TESTING=off",
]

if build.head?
libomp = Formula["libomp"]
configure_args.concat(
[
"-DOpenMP_CXX_FLAGS='-Xpreprocessor -fopenmp -I#{libomp.include}'",
"-DOpenMP_CXX_LIB_NAMES=omp",
"-DOpenMP_omp_LIBRARY=#{libomp.lib}/libomp.dylib",
],
)
end

system "cmake", ".", *configure_args, *std_cmake_args
system "make", "install"
end

Expand Down