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

open-adventure: replace pyyaml formula with resource #176560

Merged
merged 1 commit into from
Jul 6, 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
15 changes: 11 additions & 4 deletions Formula/o/open-adventure.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class OpenAdventure < Formula
include Language::Python::Virtualenv

desc "Colossal Cave Adventure, the 1995 430-point version"
homepage "http://www.catb.org/~esr/open-adventure/"
url "http://www.catb.org/~esr/open-adventure/advent-1.19.tar.gz"
Expand All @@ -22,8 +24,8 @@ class OpenAdventure < Formula
end

depends_on "asciidoc" => :build
depends_on "libyaml" => :build
depends_on "[email protected]" => :build
depends_on "pyyaml" => :build

uses_from_macos "libxml2" => :build
uses_from_macos "libedit"
Expand All @@ -32,12 +34,17 @@ class OpenAdventure < Formula
depends_on "pkg-config" => :build
end

resource "pyyaml" do
url "https://files.pythonhosted.org/packages/cd/e5/af35f7ea75cf72f2cd079c95ee16797de7cd71f29ea7c68ae5ce7be1eda0/PyYAML-6.0.1.tar.gz"
sha256 "bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"
end

def install
python = Formula["[email protected]"].opt_bin/"python3.12"
system python, "./make_dungeon.py"
venv = virtualenv_create(buildpath, "python3.12")
venv.pip_install resources
system venv.root/"bin/python", "./make_dungeon.py"
system "make"
bin.install "advent"
system "make", "advent.6"
man6.install "advent.6"
end

Expand Down
Loading