76 lines
2.1 KiB
Ruby
76 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.6.tar.bz2"
|
|
sha256 "8c2234a325659b9c1596ecb4065e969324308e90cd031ac0442510bb9a6f3310"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "ce78855ed35156014072eacfaee75637535053b4b0b9e8bf754d20a8ce0cd6a1" => :sierra
|
|
sha256 "5a8a97c4073f7d14e1ab7df3bb57fafda27f5ac0d20294eab340f91f23cb67d3" => :el_capitan
|
|
sha256 "60c96b476b4655566c0c9dfdf6724787e792ccfb63aac54b4f3a7ab556f6c6c1" => :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
|