-
Notifications
You must be signed in to change notification settings - Fork 1
/
feelpp.rb
49 lines (44 loc) · 1.7 KB
/
feelpp.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require 'formula'
# We remove the use of submodules as it makes the checkout step
# fails if we don't have access to them but keep the ones in contrib
class GitNoSubmoduleDownloadStrategy < GitDownloadStrategy
def initialize name, resource
super
end
def update_submodules
safe_system 'git', 'submodule', '--quiet', 'deinit', '-f', '--all'
safe_system 'git', 'submodule', '--quiet', 'update', '--init', '--recursive'
end
end
class Feelpp < Formula
homepage 'http://docs.feelpp.org'
url 'https://github.com/feelpp/feelpp/releases/download/v0.104.0-beta.1/feelpp-0.104.0-beta.1.tar.gz'
head 'https://github.com/feelpp/feelpp.git', :using => GitNoSubmoduleDownloadStrategy, :branch => 'develop'
version '0.110.0-rc.2'
sha256 '70418fb0ce9f5069190fcc1677615663dbca71cea39e2b858356476a9e8627cf'
# on M1 cln must be compiled from source and HEAD/installed like this: brew install --build-from-source cln --HEAD
depends_on 'cmake' => :build
depends_on 'cln'
depends_on 'mongo-c'
depends_on 'eigen'
depends_on 'hdf5' => ['with-mpi']
depends_on 'gmsh' => :recommended #feel++ can download and install it
depends_on 'scalapack'
depends_on 'petsc'
# depends_on 'slepc' => :recommended
depends_on 'boost' => ['c++17']
depends_on 'boost-mpi' => ['c++17']
# depends_on 'ann' => :recommended
depends_on 'glpk' => :recommended
depends_on 'doxygen' => :optional
def install
system "cmake","--preset","feelpp"
system "cmake","--build","--preset","feelpp"
system "cmake","--build","--preset","feelpp","install"
end
# create a CMakeLists.txt and a test.cpp initializing the environment
# and try to compile it
test do
# system 'ctest', '--preset','feelpp','qs'
end
end