class Qmmp < Formula desc "Qt-based Multimedia Player" homepage "http://qmmp.ylsoftware.com/" url "http://qmmp.ylsoftware.com/files/qmmp-1.3.4.tar.bz2" sha256 "e07d9026e5d0c53bf1a057974088363929a06f4e3785447956879b204c7d3b49" head "https://svn.code.sf.net/p/qmmp-dev/code/branches/qmmp-1.3/" bottle do sha256 "08ed79c3a818a9f9552c92f1413f6058dd4d9ca01aa46a66f29a5bedbaa15d87" => :mojave sha256 "f38af2c80e8e6e1c68f2fb9d7765f3a0978d901e7355b1568c865885e7a36fe4" => :high_sierra sha256 "ddb1cc7eeecc93daecb2982c53080836f817fb596a338927f9a13213c6b0b6c5" => :sierra 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" 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