69 lines
2 KiB
Ruby
69 lines
2 KiB
Ruby
class Ncmpcpp < Formula
|
|
desc "Ncurses-based client for the Music Player Daemon"
|
|
homepage "https://rybczak.net/ncmpcpp/"
|
|
url "https://rybczak.net/ncmpcpp/stable/ncmpcpp-0.8.tar.bz2"
|
|
sha256 "2f0f2a1c0816119430880be6932e5eb356b7875dfa140e2453a5a802909f465a"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "c263943f750b841a1d2dd3867143ce923e49c0c87d29a7732f125134d3f1ac59" => :sierra
|
|
sha256 "358da9e220c29a152a74d7c3bb78448aefdf1313cf44a7f7048c5b7cac521d38" => :el_capitan
|
|
sha256 "b6e69bf58beff3adfc99fd868ec57f44d47780ca61138afd4ade38338a3153c3" => :yosemite
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/arybczak/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 "boost"
|
|
depends_on "libmpdclient"
|
|
depends_on "ncurses"
|
|
depends_on "readline"
|
|
depends_on "taglib"
|
|
depends_on "fftw" if build.with? "visualizer"
|
|
|
|
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"
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", *args
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
ENV.delete("LC_CTYPE")
|
|
assert_match version.to_s, shell_output("#{bin}/ncmpcpp --version")
|
|
end
|
|
end
|