Skip to content

Commit 63245a4

Browse files
committed
caveats: use 'sudo env' to work around the fact that /opt/homebrew/bin isn't in sudo's PATH
1 parent 56e69d2 commit 63245a4

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Formula/auto-multiple-choice.rb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ class AutoMultipleChoice < Formula
422422
end
423423
resource "Net::SSLeay" do
424424
url "https://cpan.metacpan.org/authors/id/C/CH/CHRISN/Net-SSLeay-1.94.tar.gz"
425-
sha256 "f8696cfaca98234679efeedc288a9398fcf77176f1f515dbc589ada7c650dc93"
425+
sha256 "9d7be8a56d1bedda05c425306cc504ba134307e0c09bda4a788c98744ebcd95d"
426426
end
427427
resource "Mozilla::CA" do
428428
url "https://cpan.metacpan.org/authors/id/A/AB/ABH/Mozilla-CA-20200520.tar.gz"
@@ -452,6 +452,14 @@ class AutoMultipleChoice < Formula
452452
url "https://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.73.tar.gz"
453453
sha256 "bc315fa12e8f1e3ee5e2f430d90b708a5dc7e47c867dba8dce3a6b8fbe257744"
454454
end
455+
resource "Hash::Merge" do
456+
url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Hash-Merge-0.302.tar.gz"
457+
sha256 "ae0522f76539608b61dde14670e79677e0f391036832f70a21f31adde2538644"
458+
end
459+
resource "Clone::Choose" do
460+
url "https://cpan.metacpan.org/authors/id/H/HE/HERMES/Clone-Choose-0.010.tar.gz"
461+
sha256 "5623481f58cee8edb96cd202aad0df5622d427e5f748b253851dfd62e5123632"
462+
end
455463

456464
def install
457465
installed = {} # helps me avoid installing the same perl package twice
@@ -470,7 +478,7 @@ def install
470478
ENV["PERL_MM_USE_DEFAULT"] = "1" # for always saying "yes" in Makefile.PL
471479

472480
# The Libertine font provided by 'brew cask' is 'Linux Libertine' (no O)
473-
inreplace ["AMC-annotate.pl", "AMC-perl/AMC/Annotate.pm", "AMC-perl/AMC/Config.pm",
481+
inreplace ["AMC-annotate.pl.in", "AMC-perl/AMC/Annotate.pm", "AMC-perl/AMC/Config.pm",
474482
"AMC-perl/AMC/Filter/plain.pm", "buildpdf.cc"], "Linux Libertine O", "Linux Libertine"
475483

476484
# When using 'sudo auto-multiple-choice latex-link', make sure that the
@@ -503,6 +511,7 @@ def install
503511
PERLDIR=#{libexec}/lib/perl5
504512
DESKTOPDIR=
505513
METAINFODIR=
514+
CSSDIR=#{prefix}/share/auto-multiple-choice/gtk
506515
EOS
507516

508517
# The actual build
@@ -623,6 +632,8 @@ def install
623632
Glib
624633
ExtUtils::PkgConfig
625634
ExtUtils::Depends
635+
Hash::Merge
636+
Clone::Choose
626637
Locale::gettext
627638
Module::Load::Conditional
628639
OpenOffice::OODoc
@@ -760,12 +771,12 @@ def caveats
760771
<<~EOS
761772
If you don't have Mactex installed, you will need it:
762773
763-
brew install homebrew/cask/mactex
774+
brew install mactex
764775
765776
Where is automultiplechoice.sty? After installing, run:
766777
767-
sudo auto-multiple-choice latex-link remove
768-
sudo auto-multiple-choice latex-link
778+
sudo env PATH="$PATH" auto-multiple-choice latex-link remove
779+
sudo env PATH="$PATH" auto-multiple-choice latex-link
769780
770781
If you have any problem/remark regarding this formula, you can submit
771782
an issue to https://github.com/maelvls/homebrew-amc.

0 commit comments

Comments
 (0)