2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-12 00:29:24 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mplayer < Formula
|
2009-12-07 15:31:51 +00:00
|
|
|
homepage 'http://www.mplayerhq.hu/'
|
2011-06-19 00:08:27 +00:00
|
|
|
url 'ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc4.tar.bz2'
|
|
|
|
md5 '1699c94de39da9c4c5d34e8f58e418f0'
|
|
|
|
|
2010-06-28 21:55:31 +00:00
|
|
|
head 'svn://svn.mplayerhq.hu/mplayer/trunk', :using => StrictSubversionDownloadStrategy
|
2009-12-07 15:31:51 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2011-03-26 19:33:49 +00:00
|
|
|
depends_on 'yasm' => :build
|
2009-08-12 00:29:24 +00:00
|
|
|
|
2011-03-08 07:04:30 +00:00
|
|
|
def patches
|
2011-06-19 00:08:27 +00:00
|
|
|
# When building from SVN HEAD, configure prompts the user to pull FFmpeg
|
|
|
|
# from git. Don't do that.
|
2011-07-25 21:19:58 +00:00
|
|
|
if ARGV.build_head?
|
|
|
|
DATA
|
|
|
|
elsif `uname -r` =~ /^11\./
|
|
|
|
# Lion requires the following diff (which is already fixed in svn trunk)
|
|
|
|
"https://raw.github.com/gist/1105164/704c64c97ab7ffcc3e5f69b1c5d4fb0850f572c1/vd_mpng.c.diff"
|
|
|
|
end
|
2011-03-08 07:04:30 +00:00
|
|
|
end
|
|
|
|
|
2009-08-12 00:29:24 +00:00
|
|
|
def install
|
2011-06-19 00:08:27 +00:00
|
|
|
# (A) Do not use pipes, per bug report and MacPorts
|
|
|
|
# * https://github.com/mxcl/homebrew/issues/622
|
|
|
|
# * http://trac.macports.org/browser/trunk/dports/multimedia/mplayer-devel/Portfile
|
|
|
|
# (B) Any kind of optimisation breaks the build
|
2010-02-19 23:39:52 +00:00
|
|
|
ENV.gcc_4_2
|
|
|
|
ENV['CFLAGS'] = ''
|
|
|
|
ENV['CXXFLAGS'] = ''
|
2009-12-07 15:31:51 +00:00
|
|
|
|
2011-06-29 15:15:59 +00:00
|
|
|
# we disable cdparanoia because homebrew's version is hacked to work on OS X
|
|
|
|
# and mplayer doesn't expect the hacks we apply. So it chokes.
|
|
|
|
system './configure', "--prefix=#{prefix}", "--disable-cdparanoia"
|
2009-09-18 08:13:46 +00:00
|
|
|
system "make"
|
2009-08-12 00:29:24 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2009-12-04 17:44:18 +00:00
|
|
|
end
|
2011-03-08 07:04:30 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/configure b/configure
|
|
|
|
index ef60340..0b24e73 100755
|
|
|
|
--- a/configure
|
|
|
|
+++ b/configure
|
2011-04-16 18:12:40 +00:00
|
|
|
@@ -48,8 +48,6 @@
|
|
|
|
fi
|
2011-03-08 07:04:30 +00:00
|
|
|
|
2011-04-16 18:12:40 +00:00
|
|
|
if ! 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 --depth 1 git://git.videolan.org/ffmpeg.git ffmpeg ; then
|
|
|
|
rm -rf ffmpeg
|
|
|
|
echo "Failed to get a FFmpeg checkout"
|