From 4932135d568ae3ec073838d1d4d5d828a103a88d Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Sat, 4 Jan 2025 17:12:53 -0500 Subject: [PATCH] ncmpc 0.51 Signed-off-by: Rui Chen Co-authored-by: Carlo Cabrera --- .github/autobump.txt | 1 + Formula/n/ncmpc.rb | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/autobump.txt b/.github/autobump.txt index 8517ebd976e45..6d770698d7196 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -2123,6 +2123,7 @@ nbdime ncc ncdc ncdu +ncmpc ncmpcpp ncnn nco diff --git a/Formula/n/ncmpc.rb b/Formula/n/ncmpc.rb index ad215a8daebc9..25d8c4d27fec2 100644 --- a/Formula/n/ncmpc.rb +++ b/Formula/n/ncmpc.rb @@ -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 @@ -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 @@ -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)... + 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"