@@ -3,8 +3,8 @@ class Freebayes < Formula
3
3
homepage "https://github.com/freebayes/freebayes"
4
4
# pull from git tag to get submodules
5
5
url "https://github.com/freebayes/freebayes.git" ,
6
- tag : "v1.3.9 " ,
7
- revision : "ab36d1f789c039ba872f5d911ce6ff09952dc329 "
6
+ tag : "v1.3.10 " ,
7
+ revision : "b0d8efd9fa7f6612c883ec5ff79e4d17a0c29993 "
8
8
license "MIT"
9
9
head "https://github.com/freebayes/freebayes.git" , branch : "master"
10
10
@@ -28,73 +28,30 @@ class Freebayes < Formula
28
28
sha256 x86_64_linux : "8b76cc3e3db9575510c456b74286a1f5732e5495b3c1232311a2c0c220fc7e0f"
29
29
end
30
30
31
- depends_on "cmake" => :build # for vcflib
31
+ depends_on "cmake" => :build
32
32
depends_on "meson" => :build
33
33
depends_on "ninja" => :build
34
34
depends_on "pkgconf" => :build
35
- depends_on "pybind11" => :build # for vcflib
36
35
depends_on "simde" => :build
37
- depends_on "wfa2-lib" => :build # for vcflib
38
- depends_on "xz" => :build # for vcflib
36
+ depends_on "wfa2-lib" => :build
39
37
depends_on "htslib"
38
+ depends_on "tabixpp"
40
39
41
- uses_from_macos "bzip2" => :build # for vcflib
42
- uses_from_macos "zlib" => :build # for vcflib
40
+ uses_from_macos "llvm" => :build
43
41
44
- on_macos do
45
- depends_on "libomp" => :build # for vcflib
46
- end
47
-
48
- resource "vcflib" do
49
- url "https://github.com/vcflib/vcflib/releases/download/v1.0.12/vcflib-1.0.12-src.tar.gz"
50
- sha256 "cb1e78d675f06ae3b22ffed7e1dea317e4c7f826e51e5b5dabd80240efbe1019"
51
-
52
- # Backport fix for using external `wfa2-lib`
53
- patch do
54
- url "https://github.com/vcflib/vcflib/commit/5e4edec2fba5d5a51dae7a9fe48d0252ade53857.patch?full_index=1"
55
- sha256 "e7d6d433d837dd823916ef91fe0165bf4ba4f05c52fd4c9517aef7f80653a2a8"
56
- end
57
-
58
- # Apply open PR to help find `wfa2-lib` include directory
59
- # PR ref: https://github.com/vcflib/vcflib/pull/413
60
- patch do
61
- url "https://github.com/vcflib/vcflib/commit/9f9237ff0e6b4887f0edfc88587957aa736ced7b.patch?full_index=1"
62
<
10000
/td>
- sha256 "bede43d22b4b47141cd90edc4df90f65b9ac41e9598c2b05b2fe7fa84ea51aa8"
63
- end
64
- end
65
-
66
- # Apply open PR to help Meson locate vcflib and wfa2 libraries
67
- # PR ref: https://github.com/freebayes/freebayes/pull/822
68
- patch do
69
- url "https://github.com/freebayes/freebayes/commit/b458396e1acbad3983c70c202a6db2b3711a8eac.patch?full_index=1"
70
- sha256 "b5c7d855d4d66c6c96dada307e82ccbf0b6904a25928c4f3e163f52e178b7907"
71
- end
72
-
73
- # Apply open PR to fix build when using git submodules
74
- # PR ref: https://github.com/freebayes/freebayes/pull/823
75
- patch do
76
- url "https://github.com/freebayes/freebayes/commit/35eeacb6468fdce25233a33f7216f4e776d381f9.patch?full_index=1"
77
- sha256 "1b6f0bb1e369a4b11e9a7754f3b789035b39cc5d9e3dbbac84fde21893f0d9be"
42
+ resource "intervaltree" do
43
+ url "https://github.com/ekg/intervaltree/archive/refs/tags/v0.1.tar.gz"
44
+ sha256 "7ba41f164a98bdcd570f1416fde1634b23d3b0d885b11ccebeec76f58810c307"
78
45
end
79
46
80
47
def install
81
- resource ( "vcflib" ) . stage do
82
- rm_r ( [ "contrib/WFA2-lib" , "contrib/tabixpp/htslib" ] ) # avoid bundled libraries
83
-
84
- system "cmake" , "-S" , "." , "-B" , "build" ,
85
- "-DBUILD_DOC=OFF" ,
86
- "-DBUILD_ONLY_LIB=ON" ,
87
- "-DZIG=OFF" ,
88
- *std_cmake_args ( install_prefix : buildpath /"vendor" )
89
- system "cmake" , "--build" , "build"
90
- system "cmake" , "--install" , "build"
91
- system "make" , "-C" , "contrib/intervaltree" , "install" , "DESTDIR=" , "PREFIX=#{ buildpath } /vendor"
92
- ( buildpath /"vendor/include" ) . install "contrib/tabixpp/tabix.hpp"
48
+ # add contrib to include directories
49
+ inreplace "meson.build" , "incdir = include_directories(" , "incdir = include_directories('contrib',"
93
50
94
- ENV . append_path "LIBRARY_PATH" , buildpath / "vendor/bin"
95
- ENV . append_to_cflags "-I #{ buildpath } /vendor/include"
96
- ENV . append_to_cflags "-I #{ buildpath } /vendor/ include/vcflib"
97
- end
51
+ # install intervaltree
52
+ ( buildpath / "contrib/intervaltree" ) . install resource ( "intervaltree" )
53
+ # add tabixpp to include directories
54
+ ENV . append_to_cflags "-I #{ Formula [ "tabixpp" ] . opt_include } -L #{ Formula [ "tabixpp" ] . opt_lib } -ltabix"
98
55
99
56
# Set prefer_system_deps=false as we don't have formulae for these and some are not versioned/tagged
100
57
system "meson" , "setup" , "build" , "-Dcpp_std=c++14" , "-Dprefer_system_deps=false" , *std_meson_args
0 commit comments