homebrew-core/Formula/ncmpcpp.rb
2016-01-14 09:36:43 +00:00

74 lines
2 KiB
Ruby

class Ncmpcpp < Formula
desc "Ncurses-based client for the Music Player Daemon"
homepage "http://rybczak.net/ncmpcpp/"
url "http://rybczak.net/ncmpcpp/stable/ncmpcpp-0.6.7.tar.bz2"
sha256 "08807dc515b4e093154a6e91cdd17ba64ebedcfcd7aa34d0d6eb4d4cc28a217b"
revision 2
bottle do
cellar :any
sha256 "1e893ddcf65e3982d726960d98b87c84f175830d15ee6613600cf238d938bd03" => :el_capitan
sha256 "b1a16416a352a76ddf5ecab88b3fe48bc4c25dcd9d6f1c4fc32e6689e826d264" => :yosemite
sha256 "68a25530d82af8e2ebdb602b9a7409a3049f967f8864960f18f113ebee241479" => :mavericks
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"
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
assert_match version.to_s, shell_output("#{bin}/ncmpcpp --version")
end
end