forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfwdpp.rb
40 lines (34 loc) · 1.35 KB
/
fwdpp.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
class Fwdpp < Formula
desc "fwdpp is a C++ template library for forward-time population genetic simulations"
homepage "https://molpopgen.github.io/fwdpp/"
url "https://github.com/molpopgen/fwdpp/archive/0.3.7.tar.gz"
sha256 "fbc3afa48072ca1884488faad40658cba33357e9a83333c8665b6ce71bd3cc81"
head "https://github.com/molpopgen/fwdpp.git"
# doi "10.1534/genetics.114.165019"
bottle do
cellar :any
sha256 "17dbf1d46a5b86d2920871378a7b83cec07939591dce757b7716f35f214bda11" => :yosemite
sha256 "d95138be3649b89362de5d833ccdfa60e387b6625eb946726db326a49dbf2fa9" => :mavericks
end
option "without-check", "Disable build-time checking (not recommended)"
depends_on "gsl"
depends_on "boost" => :recommended
depends_on "libsequence"
# build fails on mountain lion at configure stage when looking for libsequence
# so restrict to mavericks and newer
depends_on :macos => :mavericks
def install
system "./configure", "--prefix=#{prefix}"
system "make"
system "make", "check" if build.with? "check"
system "make", "install"
pkgshare.install "examples" # install examples
pkgshare.install "unit" # install unit tests
end
test do
# run unit tests compiled with 'make check'
if build.with? "check"
Dir["#{pkgshare}/unit/*"].each { |f| system f if File.file?(f) && File.executable?(f) }
end
end
end