From ffd3bbd77b1ca372437fde9c8ff7c21ceb22b2a0 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 18 Jan 2025 00:06:16 -0500 Subject: [PATCH 1/2] asciigen 1.0.4 (new formula) Signed-off-by: Rui Chen --- .github/autobump.txt | 1 + Formula/a/asciigen.rb | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Formula/a/asciigen.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index 63d79e677d426..021a8f3bd1ea2 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -115,6 +115,7 @@ asak ascii asciidoctor asciidoctorj +asciigen asdf asio ask-cli diff --git a/Formula/a/asciigen.rb b/Formula/a/asciigen.rb new file mode 100644 index 0000000000000..2d7ffa7c19f77 --- /dev/null +++ b/Formula/a/asciigen.rb @@ -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 From cc53ffd92ce5997c2aea6d770112582f968c8310 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 18 Jan 2025 14:11:53 +0000 Subject: [PATCH 2/2] asciigen: add 1.0.4 bottle. --- Formula/a/asciigen.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/a/asciigen.rb b/Formula/a/asciigen.rb index 2d7ffa7c19f77..425466792dda7 100644 --- a/Formula/a/asciigen.rb +++ b/Formula/a/asciigen.rb @@ -5,6 +5,15 @@ class Asciigen < Formula 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"