homebrew-core/Formula/mplayer.rb

72 lines
2.1 KiB
Ruby

class Mplayer < Formula
desc "UNIX movie player"
homepage "https://mplayerhq.hu/"
url "https://mplayerhq.hu/MPlayer/releases/MPlayer-1.4.tar.xz"
sha256 "82596ed558478d28248c7bc3828eb09e6948c099bbd76bb7ee745a0e3275b548"
revision 2
livecheck do
url "https://mplayerhq.hu/MPlayer/releases/"
regex(/href=.*?MPlayer[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
cellar :any
sha256 "acaa1e3eefe8b4cdf1ec9280897ccf9105df580ad3912a41c8cbe1d7d6572d62" => :big_sur
sha256 "0dd16cbb1ae697835329526876e76bea3801b6e0282a224bdb8ad80a8ff34442" => :catalina
sha256 "e2ffb89894320617bd3dd058060f1a99d94a3b18b8daa349cea6cdd15385adfb" => :mojave
end
head do
url "svn://svn.mplayerhq.hu/mplayer/trunk"
# When building SVN, configure prompts the user to pull FFmpeg from git.
# Don't do that.
patch :DATA
end
depends_on "pkg-config" => :build
depends_on "yasm" => :build
depends_on "fontconfig"
depends_on "freetype"
depends_on "libcaca"
def install
# we disable cdparanoia because homebrew's version is hacked to work on macOS
# and mplayer doesn't expect the hacks we apply. So it chokes. Only relevant
# if you have cdparanoia installed.
# Specify our compiler to stop ffmpeg from defaulting to gcc.
args = %W[
--cc=#{ENV.cc}
--host-cc=#{ENV.cc}
--disable-cdparanoia
--prefix=#{prefix}
--disable-x11
--enable-caca
--enable-freetype
]
system "./configure", *args
system "make"
system "make", "install"
end
test do
system "#{bin}/mplayer", "-ao", "null", "/System/Library/Sounds/Glass.aiff"
end
end
__END__
diff --git a/configure b/configure
index addc461..3b871aa 100755
--- a/configure
+++ b/configure
@@ -1517,8 +1517,6 @@ if test -e ffmpeg/mp_auto_pull ; then
fi
if test "$ffmpeg_a" != "no" && ! test -e ffmpeg ; then
- echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
- read tmp
if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
rm -rf ffmpeg
echo "Failed to get a FFmpeg checkout"