Skip to content

Commit

Permalink
cryfs: add OpenMP support to HEAD (#32588)
Browse files Browse the repository at this point in the history
  • Loading branch information
smessmer authored and fxcoudert committed Oct 3, 2018
1 parent 3cbdf06 commit 9ba3d6e
Showing 1 changed file with 21 additions and 2 deletions.
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

0 comments on commit 9ba3d6e

Please sign in to comment.