Skip to content

Commit

Permalink
asciigen 1.0.4 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Jan 18, 2025
1 parent a723a1f commit ffd3bbd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
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

0 comments on commit ffd3bbd

Please sign in to comment.