Skip to content

Commit

Permalink
ncmpc 0.51
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>

Co-authored-by: Carlo Cabrera <[email protected]>
  • Loading branch information
chenrui333 and carlocab committed Jan 5, 2025
1 parent 2e17440 commit bec9cb4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2123,6 +2123,7 @@ nbdime
ncc
ncdc
ncdu
ncmpc
ncmpcpp
ncnn
nco
Expand Down
26 changes: 20 additions & 6 deletions Formula/n/ncmpc.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Ncmpc < Formula
desc "Curses Music Player Daemon (MPD) client"
homepage "https://www.musicpd.org/clients/ncmpc/"
url "https://www.musicpd.org/download/ncmpc/0/ncmpc-0.49.tar.xz"
sha256 "65bbec0ede9e6bcf62ac647b0c706485beb2bdd5db70ca8d60103f32f162cf29"
url "https://www.musicpd.org/download/ncmpc/0/ncmpc-0.51.tar.xz"
sha256 "e74be00e69bc3ed1268cafcc87274e78dfbde147f2480ab0aad8260881ec7271"
license "GPL-2.0-or-later"

livecheck do
Expand All @@ -24,19 +24,24 @@ class Ncmpc < Formula
end

depends_on "boost" => :build
depends_on "gettext" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkgconf" => :build
depends_on "gettext"

depends_on "fmt"
depends_on "libmpdclient"
depends_on "pcre2"

uses_from_macos "ncurses"

on_macos do
depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1300
depends_on "gettext"
depends_on "llvm" if DevelopmentTools.clang_build_version <= 1500
end

fails_with :clang do
build 1300
build 1500
cause "Requires C++20"
end

Expand All @@ -46,7 +51,16 @@ class Ncmpc < Formula
end

def install
ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1300)
if OS.mac? && (DevelopmentTools.clang_build_version <= 1500)
ENV.prepend_path "PATH", Formula["llvm"].opt_bin
ENV.llvm_clang

# Work around failure mixing newer `llvm` headers with older Xcode's libc++:
# Undefined symbols for architecture arm64:
# "std::exception_ptr::__from_native_exception_pointer(void*)", referenced from:
# std::exception_ptr std::make_exception_ptr[abi:fe190100]<std::runtime_error>(std::runtime_error)...
ENV.append "LDFLAGS", "-L#{Formula["llvm"].opt_lib}/c++ -L#{Formula["llvm"].opt_lib -lunwind"
end
system "meson", "setup", "build", "-Dcolors=false", "-Dnls=enabled", "-Dregex=enabled", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
Expand Down

0 comments on commit bec9cb4

Please sign in to comment.