homebrew-core/Formula/qmmp.rb

60 lines
1.8 KiB
Ruby

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.2.tar.bz2"
sha256 "cac9518c1fa7abd4558efb78cb8a8a637db065c66420e45f1b2f33902ce07fcf"
license "GPL-2.0-or-later"
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 "343a1715ee0854365984a75de76d45e1121ebb0973320d83fb72b57f2cc050b6" => :big_sur
sha256 "035e511cd658ed37d0ee1313b579689d2fee64dced1b76320337e3933efe86e5" => :catalina
sha256 "07cb54096a3ffd6c2d73485f5d7a49802f5c4d7f5c6546d9be50e3a36e0adaeb" => :mojave
sha256 "2bc4a8d7adc72acd0d25123e8c0b40130abe428c10c029cb0853afacca9e1209" => :high_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