class Qmmp < Formula desc "Qt-based Multimedia Player" homepage "https://qmmp.ylsoftware.com/" url "https://downloads.sourceforge.net/project/qmmp-dev/qmmp/qmmp-1.4.4.tar.bz2" sha256 "b1945956109fd9c7844ee5780142c0d24564b88327dc2f9a61d29386abcf9d54" license "GPL-2.0-or-later" revision 1 head "https://svn.code.sf.net/p/qmmp-dev/code/branches/qmmp-1.4/" livecheck do url :stable regex(%r{url=.*?/qmmp[._-]v?(\d+(?:\.\d+)+)\.t}i) end bottle do sha256 big_sur: "63ce3f17fa4f0d129ca5273addd5d6eb13a1a09b8874fb9beee1ad2adbd0d994" sha256 catalina: "24bc3187a83efa5687a03497c3bb3dc0772a924b71ca8663b40851c8b8d604d1" sha256 mojave: "5368c30b051f55c972b792655aa0a3c0e5e6cf65b7caeee4da973be5b2bd37ce" end depends_on "cmake" => :build depends_on "faad2" depends_on "ffmpeg" depends_on "flac" depends_on "libbs2b" depends_on "libmms" depends_on "libogg" depends_on "libsamplerate" depends_on "libsndfile" depends_on "libsoxr" depends_on "libvorbis" depends_on "mad" depends_on "mplayer" depends_on "musepack" depends_on "opus" depends_on "opusfile" depends_on "qt@5" depends_on "taglib" def install system "cmake", "./", "-USE_SKINNED", "-USE_ENCA", "-USE_QMMP_DIALOG", *std_cmake_args system "make", "install" # fix linkage cd (lib.to_s) do Dir["*.dylib", "qmmp/*/*.so"].select { |f| File.ftype(f) == "file" }.each do |f| MachO::Tools.dylibs(f).select { |d| d.start_with?("/tmp") }.each do |d| bname = File.dirname(d) d_new = d.sub(bname, opt_lib.to_s) MachO::Tools.change_install_name(f, d, d_new) end end end end test do system bin/"qmmp", "--version" end end