Skip to content

Commit

Permalink
meme 5.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshitakaMo committed Apr 27, 2024
1 parent 2c49bf6 commit 52f5a7d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Formula/meme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class Meme < Formula
depends_on "python@3.12"

uses_from_macos "perl" => :build
uses_from_macos "libxml2"
uses_from_macos "libxslt"

on_linux do
depends_on "perl-xml-parser" => :build
Expand All @@ -30,11 +28,24 @@ def install
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-mpidir=#{Formula["open-mpi"].opt_prefix}",
"--enable-build-libxml2",
"--enable-build-libxslt",
"--with-python=#{Formula["python@3.12"].opt_bin}/python3",
"--with-gs=#{Formula["ghostscript"].opt_bin}/gs"

system "make"
system "make", "install"
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

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
pkgshare.install "tests/common/At.s"
end

Expand Down

0 comments on commit 52f5a7d

Please sign in to comment.