From 52f5a7dfbf640f72def8e85e1ad95e8a38900e95 Mon Sep 17 00:00:00 2001 From: Yoshitaka Moriwaki Date: Sun, 28 Apr 2024 01:41:35 +0900 Subject: [PATCH] meme 5.5.5 --- Formula/meme.rb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Formula/meme.rb b/Formula/meme.rb index 7793abfa4..caeae9025 100644 --- a/Formula/meme.rb +++ b/Formula/meme.rb @@ -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 @@ -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