homebrew-core/Formula/mplayer.rb
2019-01-23 08:58:32 +00:00

62 lines
1.9 KiB
Ruby

class Mplayer < Formula
desc "UNIX movie player"
homepage "https://mplayerhq.hu/"
url "https://mplayerhq.hu/MPlayer/releases/MPlayer-1.3.0.tar.xz"
sha256 "3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843"
revision 1
bottle do
cellar :any
sha256 "431d83725fe2589d7e7622e3247b9eaf011741d0725577d83b865dc2e618b5b3" => :mojave
sha256 "b339ca86990026c8205bacf4fdb9f70778852d6eb053f2b923c39c4b24eb90b9" => :high_sierra
sha256 "81eea942e3ac67665125890cef18ae27610ec59bd3aa257c984f562f100167ad" => :sierra
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 "yasm" => :build
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
]
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"