homebrew-core/Formula/strace.rb

33 lines
996 B
Ruby

class Strace < Formula
desc "Diagnostic, instructional, and debugging tool for the Linux kernel"
homepage "https://strace.io/"
url "https://github.com/strace/strace/releases/download/v5.12/strace-5.12.tar.xz"
sha256 "29171edf9d252f89c988a4c340dfdec662f458cb8c63d85431d64bab5911e7c4"
license "LGPL-2.1-or-later"
head do
url "https://github.com/strace/strace.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
end
depends_on :linux
depends_on "linux-headers"
def install
system "./bootstrap" if build.head?
system "./configure",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--enable-mpers=no" # FIX: configure: error: Cannot enable m32 personality support
system "make", "install"
end
test do
out = `"strace" "true" 2>&1` # strace the true command, redirect stderr to output
assert_match "execve(", out
assert_match "+++ exited with 0 +++", out
end
end