diff --git a/Formula/cryfs.rb b/Formula/cryfs.rb index 6449773a7aef..e3108ab1e272 100644 --- a/Formula/cryfs.rb +++ b/Formula/cryfs.rb @@ -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 @@ -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" @@ -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