homebrew-core/Formula/ncmpcpp.rb
2016-12-28 08:52:12 -08:00

77 lines
2.1 KiB
Ruby

class Ncmpcpp < Formula
desc "Ncurses-based client for the Music Player Daemon"
homepage "https://rybczak.net/ncmpcpp/"
url "https://ncmpcpp.rybczak.net/stable/ncmpcpp-0.7.7.tar.bz2"
sha256 "b7bcbec83b1f88cc7b21f196b10be09a27b430566c59f402df170163464d01ef"
revision 1
bottle do
cellar :any
sha256 "3595e188d8fb6bab50d8e4f086f6eb6b7e28eb2fb69c6eb11c50ff90956e8327" => :sierra
sha256 "598500607763ae05abb5689ff72655d5156d0d176db8eeb0d3797d1f5e160a99" => :el_capitan
sha256 "4d6ac3b7a0efc84797b776cf07f3478f109d6e1f4d8b8ae31770812c38cc5e70" => :yosemite
end
head do
url "git://repo.or.cz/ncmpcpp.git"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
deprecated_option "outputs" => "with-outputs"
deprecated_option "visualizer" => "with-visualizer"
deprecated_option "clock" => "with-clock"
option "with-outputs", "Compile with mpd outputs control"
option "with-visualizer", "Compile with built-in visualizer"
option "with-clock", "Compile with optional clock tab"
depends_on "pkg-config" => :build
depends_on "libmpdclient"
depends_on "readline"
depends_on "fftw" if build.with? "visualizer"
if MacOS.version < :mavericks
depends_on "boost" => "c++11"
depends_on "taglib" => "c++11"
else
depends_on "boost"
depends_on "taglib"
end
needs :cxx11
def install
ENV.cxx11
ENV.append "LDFLAGS", "-liconv"
ENV.append "BOOST_LIB_SUFFIX", "-mt"
ENV.append "CXXFLAGS", "-D_XOPEN_SOURCE_EXTENDED"
args = [
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-taglib",
"--with-curl",
"--enable-unicode",
]
args << "--enable-outputs" if build.with? "outputs"
args << "--enable-visualizer" if build.with? "visualizer"
args << "--enable-clock" if build.with? "clock"
if build.head?
# Also runs configure
system "./autogen.sh", *args
else
system "./configure", *args
end
system "make", "install"
end
test do
ENV.delete("LC_CTYPE")
assert_match version.to_s, shell_output("#{bin}/ncmpcpp --version")
end
end