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

asciigen 1.0.4 (new formula) #204703

Merged
merged 2 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ asak
ascii
asciidoctor
asciidoctorj
asciigen
asdf
asio
ask-cli
Expand Down
32 changes: 32 additions & 0 deletions Formula/a/asciigen.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class Asciigen < Formula
desc "Converts images/video to ASCII art"
homepage "https://github.com/seatedro/asciigen"
url "https://github.com/seatedro/asciigen/archive/refs/tags/v1.0.4.tar.gz"
sha256 "2326d73376997f838bae25ebc7d1f6f84a7442db8f55ec841a7e11246b73c31f"
license "MIT"

depends_on "pkgconf" => :build
depends_on "zig" => :build
depends_on "ffmpeg"

def install
# Fix illegal instruction errors when using bottles on older CPUs.
# https://github.com/Homebrew/homebrew-core/issues/92282
cpu = case Hardware.oldest_cpu
when :arm_vortex_tempest then "apple_m1" # See `zig targets`.
else Hardware.oldest_cpu
end

args = %W[
--prefix #{prefix}
]

args << "-Dcpu=#{cpu}" if build.bottle?
system "zig", "build", *args
end

test do
system bin/"asciigen", "-i", test_fixtures("test.jpg"), "-o", "out.txt", "-c"
assert_path_exists "out.txt"
end
end
Loading