Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / mactex-no-gui.rb
blob75cbf25b6d9c99a9820bc08453a01459423d04b5
1 cask "mactex-no-gui" do
2   version "2024.0312"
3   sha256 "c1793a3ceca2c4317ca22536c887e18b3c17be0f4baaa199735e9d6a692e57dc"
5   url "https://mirror.ctan.org/systems/mac/mactex/mactex-#{version.no_dots}.pkg",
6       verified: "mirror.ctan.org/systems/mac/mactex/"
7   name "MacTeX"
8   desc "Full TeX Live distribution without GUI applications"
9   homepage "https://www.tug.org/mactex/"
11   livecheck do
12     cask "mactex"
13   end
15   conflicts_with cask: [
16     "basictex",
17     "mactex",
18   ]
19   depends_on formula: "ghostscript"
20   depends_on macos: ">= :mojave"
22   pkg "mactex-#{version.no_dots}.pkg",
23       choices: [
24         {
25           # Ghostscript
26           "choiceIdentifier" => "org.tug.mactex.ghostscript10.03.0",
27           "choiceAttribute"  => "selected",
28           "attributeSetting" => 0,
29         },
30         {
31           # Ghostscript Dynamic Library
32           "choiceIdentifier" => "org.tug.mactex.ghostscript10.03.0-libgs",
33           "choiceAttribute"  => "selected",
34           "attributeSetting" => 0,
35         },
36         {
37           # Ghostscript Mutool
38           "choiceIdentifier" => "org.tug.mactex.ghostscript10.03.0-mutool",
39           "choiceAttribute"  => "selected",
40           "attributeSetting" => 0,
41         },
42         {
43           # GUI Applications
44           "choiceIdentifier" => "org.tug.mactex.gui#{version.major}",
45           "choiceAttribute"  => "selected",
46           "attributeSetting" => 0,
47         },
48         {
49           # TeX Live
50           "choiceIdentifier" => "org.tug.mactex.texlive#{version.major}",
51           "choiceAttribute"  => "selected",
52           "attributeSetting" => 1,
53         },
54       ]
56   uninstall pkgutil: "org.tug.mactex.texlive#{version.major}",
57             delete:  [
58               "/etc/manpaths.d/TeX",
59               "/etc/paths.d/TeX",
60               "/Library/TeX",
61               "/usr/local/texlive/#{version.major}",
62             ]
64   zap trash: "/usr/local/texlive/texmf-local",
65       rmdir: "/usr/local/texlive"
67   caveats <<~EOS
68     You must restart your terminal window for the installation of MacTeX CLI
69     tools to take effect.
71     Alternatively, Bash and Zsh users can run the command:
73       eval "$(/usr/libexec/path_helper)"
74   EOS
75 end