Skip to content

Commit

Permalink
Merge pull request #204703 from Homebrew/asciigen
Browse files Browse the repository at this point in the history
asciigen 1.0.4 (new formula)
  • Loading branch information
BrewTestBot authored Jan 18, 2025
2 parents 7935b2e + cc53ffd commit bb01b3c
Show file tree
Hide file tree
Showing 2 changed files with 42 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
41 changes: 41 additions & 0 deletions Formula/a/asciigen.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
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"

bottle do
sha256 cellar: :any, arm64_sequoia: "de0e9f335659384facc45dcecc8d00f88d6d32629da49ed68d22b030c022bf39"
sha256 cellar: :any, arm64_sonoma: "8bac5ecbaf7380d8d153eca5b8d82c410398fd35c4e5d851606b627cbda2b120"
sha256 cellar: :any, arm64_ventura: "e7542f752cce0ead8b5f804923538ec21de7b8470a3cc561f32b26d71b8c8405"
sha256 cellar: :any, sonoma: "bd7fe2ed34849bc43595514f9db6be770a89c6e7c28e62320220090547946d2c"
sha256 cellar: :any, ventura: "d0520804e71a9eee3d721cd973636008d2bc422f55796bc87374da368e6e6528"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b97b03015d85f6463ff7e903928036e2f7bd7446712c13d2f3dda4e05eccc933"
end

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 bb01b3c

Please sign in to comment.