Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meme 5.5.5 #1677

Merged
merged 4 commits into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 37 additions & 29 deletions Formula/meme.rb
Original file line number Diff line number Diff line change
@@ -1,50 +1,58 @@
class Meme < Formula
# cite Bailey_2009: "https://doi.org/10.1093/nar/gkp335"
desc "Tools for motif discovery"
homepage "http://meme-suite.org"
url "http://meme-suite.org/meme-software/5.1.0/meme-5.1.0.tar.gz"
sha256 "46b527cb0eebb6ca21976dcd87aae8a4dd9cf55756679c692fc99bae895d36c9"
homepage "https://meme-suite.org"
url "https://meme-suite.org/meme/meme-software/5.5.5/meme-5.5.5.tar.gz"
sha256 "bebb4a176e72d62e3a2d5ba5f22439185bbc4bbf4769604fbca12dff8e1f739f"
license :cannot_represent

bottle do
root_url "https://ghcr.io/v2/brewsci/bio"
sha256 x86_64_linux: "b66235d3ce6851c700bc395dff15f2346234b6e84d750dd9d4d92945a999e01a"
end

# Work around the error:
# ld: file not found: /usr/lib/system/libsystem_darwin.dylib
depends_on :linux if ENV["CIRCLECI"]
depends_on "ghostscript"
depends_on "open-mpi"
depends_on "[email protected]"

depends_on "open-mpi" => :optional
unless OS.mac?
depends_on "cpanminus" => :build
depends_on "zlib" => :build
depends_on "perl"
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
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=#{libexec}",
"--with-url=http://meme-suite.org/",
"--enable-build-libxml2",
"--enable-build-libxslt"
system "make", "install"
prefix.install "tests"
perl_files = `grep -l -w "#!/usr/bin/perl" #{bin}/*`.split("\n")
perl_files.each do |file|
inreplace file, %r{^#!/usr/bin/perl.*}, "#!/usr/bin/env perl"
end
"--prefix=#{prefix}",
"--with-mpidir=#{Formula["open-mpi"].opt_prefix}",
"--enable-web" \
"--with-url=https://meme-suite.org/meme" \
"--with-python=#{Formula["[email protected]"].opt_bin}/python3",
"--with-gs=#{Formula["ghostscript"].opt_bin}/gs"

if OS.mac?
bin.install_symlink libexec/"bin/meme"
else
ENV["PERL5LIB"] = libexec/"lib/perl5"
system "cpanm", "--self-contained", "-l", libexec, "XML::Parser::Expat"
(bin/"meme").write_env_script(libexec/"bin/meme", PERL5LIB: ENV["PERL5LIB"])
end
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", prefix/"tests/common/At.s"
system bin/"meme", pkgshare/"At.s"
end
end
Loading