class Scdoc < Formula desc "Small man page generator" homepage "https://git.sr.ht/~sircmpwn/scdoc/" url "https://git.sr.ht/~sircmpwn/scdoc/archive/1.9.7.tar.gz" sha256 "7e0ef0b2fdbe40d66461b1b2900aadd889a2d91eaecd2505e85fabf6db003779" bottle do cellar :any_skip_relocation sha256 "a3ee9df4b92bb523899e1fcb4cd49e64a44b9086743c625922fde1d77de98f8f" => :mojave sha256 "2335feaf7d2aded247899a4fc58f5f361ce0f481081ed3e845349d7225207ce7" => :high_sierra sha256 "0467b73ead12fba3c0ddf647a27ce1aaa1b0063b1cda042b467a2a5fe59e4c6f" => :sierra end def install # scdoc sets by default LDFLAGS=-static which doesn't work on macos(x) system "make", "LDFLAGS=", "PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}" end test do preamble = <<~'EOF' .\" Generated by scdoc 1.9.6 .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: EOF assert_equal preamble, shell_output("#{bin}/scdoc