-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d58ad2a
commit a289b21
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
class MemeAT4 < Formula | ||
# cite Bailey_2009: "https://doi.org/10.1093/nar/gkp335" | ||
desc "Tools for motif discovery" | ||
homepage "https://meme-suite.org" | ||
url "https://meme-suite.org/meme/meme-software/4.12.0/meme_4.12.0.tar.gz" | ||
sha256 "49ff80f842b59d328588acfcd1d15bf94c55fed661d22b0f95f37430cc363a06" | ||
license :cannot_represent | ||
|
||
keg_only :versioned_formula | ||
|
||
depends_on "ghostscript" | ||
depends_on "open-mpi" | ||
depends_on "python@3.12" | ||
|
||
uses_from_macos "libxml2" | ||
uses_from_macos "libxslt" | ||
uses_from_macos "perl" | ||
uses_from_macos "zlib" | ||
|
||
resource "XML::Parser" do | ||
url "https://cpan.metacpan.org/authors/id/T/TO/TODDR/XML-Parser-2.47.tar.gz" | ||
sha256 "ad4aae643ec784f489b956abe952432871a622d4e2b5c619e8855accbfc4d1d8" | ||
end | ||
|
||
def install | ||
ENV.append "CFLAGS", "-fcommon -fgnu89-inline" | ||
ENV.append "LDFLAGS", "-Wl,--allow-multiple-definition" if OS.linux? | ||
inreplace "src/mast.h", "#include <sys/types.h>\n", "#include <sys/types.h>\n#include <sys/wait.h>\n" | ||
|
||
unless OS.mac? | ||
ENV.prepend_create_path "PERL5LIB", libexec/"lib/perl5" | ||
perl_resources = %w[XML::Parser] | ||
perl_resources.each do |r| | ||
resource(r).stage do | ||
system "perl", "Makefile.PL", "INSTALL_BASE=#{libexec}" | ||
system "make", "PERL5LIB=#{ENV["PERL5LIB"]}" | ||
system "make", "install" | ||
end | ||
end | ||
end | ||
|
||
system "./configure", | ||
"--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--with-mpidir=#{Formula["open-mpi"].opt_prefix}", | ||
"--with-url=https://meme-suite.org/meme" \ | ||
"--with-python3=#{Formula["python@3.12"].opt_bin}/python3", | ||
"--with-gs=#{Formula["ghostscript"].opt_bin}/gs" | ||
|
||
system "make", "install" | ||
bin.env_script_all_files libexec/"bin", PERL5LIB: ENV["PERL5LIB"] if OS.linux? | ||
pkgshare.install "tests/common/At.s" | ||
end | ||
|
||
test do | ||
system bin/"meme", pkgshare/"At.s" | ||
end | ||
end |