homebrew-core/Formula/midnight-commander.rb
Alexander Bayandin 7a0e593e9f
midnight-commander 4.8.22
Closes #35662.

Signed-off-by: Thierry Moisan <thierry.moisan@gmail.com>
2019-01-03 10:04:09 -05:00

45 lines
1.4 KiB
Ruby

class MidnightCommander < Formula
desc "Terminal-based visual file manager"
homepage "https://www.midnight-commander.org/"
url "https://www.midnight-commander.org/downloads/mc-4.8.22.tar.xz"
sha256 "ee7868d7ba0498cf2cccefe107d7efee7f2571098806bba2aed5a159db801318"
head "https://github.com/MidnightCommander/mc.git"
bottle do
rebuild 1
sha256 "f3d9cb2444cf1f8f757afe0c70a7c4b737718144bd667926f49fbbd35a7a290f" => :mojave
sha256 "d810c0aed2f4007b94776895822c9dd79242a10c6bd6bc6507b6f46c4bb5a9fb" => :high_sierra
sha256 "08bd22ecf0dd7183e36f01f44d6c5fd7c8ee759c08121ecaed1be19d87017247" => :sierra
end
depends_on "pkg-config" => :build
depends_on "glib"
depends_on "libssh2"
depends_on "openssl"
depends_on "s-lang"
conflicts_with "minio-mc", :because => "Both install a `mc` binary"
def install
args = %W[
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--without-x
--with-screen=slang
--enable-vfs-sftp
]
# Fix compilation bug on macOS 10.13 by pretending we don't have utimensat()
# https://github.com/MidnightCommander/mc/pull/130
ENV["ac_cv_func_utimensat"] = "no" if MacOS.version >= :high_sierra
system "./configure", *args
system "make", "install"
end
test do
assert_match "GNU Midnight Commander", shell_output("#{bin}/mc --version")
end
end