Skip to content

Commit

Permalink
libcaca 0.99b20
Browse files Browse the repository at this point in the history
  • Loading branch information
EricFromCanada committed Nov 19, 2021
1 parent cdb7b8a commit 5c59eb0
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions Formula/libcaca.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
class Libcaca < Formula
desc "Convert pixel information into colored ASCII art"
homepage "http://caca.zoy.org/wiki/libcaca"
url "http://caca.zoy.org/raw-attachment/wiki/libcaca/libcaca-0.99.beta19.tar.gz"
mirror "https://www.mirrorservice.org/sites/distfiles.macports.org/libcaca/libcaca-0.99.beta19.tar.gz"
mirror "https://fossies.org/linux/privat/libcaca-0.99.beta19.tar.gz"
version "0.99b19"
sha256 "128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4"
url "https://github.com/cacalabs/libcaca/releases/download/v0.99.beta20/libcaca-0.99.beta20.tar.bz2"
mirror "https://fossies.org/linux/privat/libcaca-0.99.beta20.tar.bz2"
version "0.99b20"
sha256 "ff9aa641af180a59acedc7fc9e663543fb397ff758b5122093158fd628125ac1"
license "WTFPL"
revision 3

# The regex here is looser than usual because it has to match unstable
# versions for now. If this software is updated in the future to a stable
# version, this regex should be modified to not match unstable versions.
livecheck do
url :homepage
regex(/href=.*?libcaca[._-]v?(\d+(?:\.\d+)+.*?)\.t/i)
url :stable
end

bottle do
Expand All @@ -41,20 +35,16 @@ class Libcaca < Formula
def install
system "./bootstrap" if build.head?

# Fix --destdir issue.
# ../.auto/py-compile: Missing argument to --destdir.
inreplace "python/Makefile.in",
'$(am__py_compile) --destdir "$(DESTDIR)"',
"$(am__py_compile) --destdir \"$(cacadir)\""

args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--disable-cocoa
--disable-csharp
--disable-doc
--disable-slang
--disable-java
--disable-csharp
--disable-python
--disable-ruby
--disable-slang
--disable-x11
]

Expand All @@ -65,6 +55,7 @@ def install
end

test do
system "#{bin}/img2txt", "--version"
cp test_fixtures("test.png"), "test.png"
assert_match "\e[0;5;34;44m", shell_output("#{bin}/img2txt test.png")
end
end

0 comments on commit 5c59eb0

Please sign in to comment.