@@ -3,38 +3,55 @@ class Muscle < Formula
33 # cite Edgar_2022: "https://doi.org/10.1038/s41467-022-34630-w"
44 desc "Multiple sequence alignment program"
55 homepage "https://www.drive5.com/muscle/"
6- url "https://github.com/rcedgar/muscle/archive/refs/tags/5.1.0.tar.gz"
7- sha256 "2bba8b06e3ccabf6465fa26f459763b2029d7e7b9596881063e3aaba60d9e87d"
8- license "GPL-3.0-or-later"
9-
10- bottle do
11- root_url "https://ghcr.io/v2/brewsci/bio"
12- rebuild 1
13- sha256 cellar : :any , arm64_sequoia : "a063eb631b2ca243a3a37a204cb2976711f9e14475e2de3ac09a1d33366f97c6"
14- sha256 cellar : :any , arm64_sonoma : "727f51957a68d3ac2235404314a9073405984ce8a55a2ca93d6a584b5ba36b36"
15- sha256 cellar : :any , ventura : "6160f9104b19e8883c384e3c01070125ea0ac153fdf3a3274073b41142fd060f"
16- sha256 cellar : :any_skip_relocation , x86_64_linux : "2690e8e9389eb9ed11ec8e15177562670cec326fc71aba75353dd3ce315d4928"
6+ url "https://github.com/rcedgar/muscle/archive/refs/tags/v5.3.tar.gz"
7+ sha256 "74b22a94e630b16015c2bd9ae83aa2be2c2048d3e41f560b2d4a954725c81968"
8+ license "GPL-3.0-only"
9+ head "https://github.com/rcedgar/muscle.git" , branch : "main"
10+
11+ depends_on "python@3.14" => :build
12+
13+ on_macos do
14+ depends_on "llvm" => :build if DevelopmentTools . clang_build_version <= 1699
15+ depends_on "libomp"
1716 end
1817
19- depends_on "libomp" if OS . mac?
18+ on_linux do
19+ depends_on "gcc"
20+ end
21+
22+ fails_with :clang do
23+ build 1699
24+ cause "Requires C++20"
25+ end
26+
27+ resource "vcxproj_make" do
28+ url "https://raw.githubusercontent.com/rcedgar/vcxproj_make/806d016/vcxproj_make.py"
29+ sha256 "902735703004c47705ffa389329378f237fecb154945b489edf6abe260c6694f"
30+ end
31+
32+ def python3
33+ which ( "python3.14" )
34+ end
2035
2136 def install
37+ resource ( "vcxproj_make" ) . stage buildpath /"src"
2238 cd "src" do
23- # Use clang++ instead of g++-11
24- inreplace "Makefile" , "g++-11" , "clang++"
25- # libomp is used for OpenMP support
26- # -std=c++11 is needed for clang
27- inreplace "Makefile" , "-fopenmp" , "-L#{ Formula [ "libomp" ] . opt_lib } -lomp -std=c++11" if OS . mac?
28- system "make"
2939 if OS . mac?
30- bin . install "Darwin/muscle"
40+ ENV [ "CPPFLAGS" ] = "-Xpreprocessor -I#{ Formula [ "libomp" ] . opt_include } "
41+ ENV [ "LDFLAGS" ] = "-L#{ Formula [ "libomp" ] . opt_lib } -lomp"
3142 else
32- bin . install "Linux/muscle "
43+ inreplace "vcxproj_make.py" , "-static" , " "
3344 end
45+ system python3 , "vcxproj_make.py" , "--openmp" , "--cppcompiler" , ENV . cxx , "--ccompiler" , ENV . cc
3446 end
47+ bin . install "bin/muscle"
48+ pkgshare . install "test_scripts" , "test_data" , "test_results"
3549 end
3650
3751 test do
3852 assert_match "muscle" , shell_output ( "#{ bin } /muscle -version" )
53+ system "#{ bin } /muscle" , "-super5" , "#{ pkgshare } /test_data/fa/BB11001" , "-output" , "test_output.fna"
54+ assert_match "MKKLKKHPDFPKKPLTPYFRFFMEKRAKYAKLHPEMS--NLDLTKILSKKYKELPEKKKMKYIQDFQREKQEFERNLAR-" ,
55+ File . read ( "test_output.fna" )
3956 end
4057end
0 commit comments