homebrew-core/Formula/mplayer.rb
Adam Vandenberg 798146a7fa Improved Subversion support.
Homebrew will now use the svn binary pointed to by HOMEBREW_SVN if set,
use a Homebrew-installed svn if present, finally falling back to the
system-provided svn binary.

If a formula (mplayer) requires a newer version of Subversion than what
Leopard provides, it can use the "StrictSubversionDownloadStrategy"
download strategy to warn the user.

These changes also fix an issue with forcing exports not working on a
stock Leopard subversion, but letting the user either specify a specific
binary or install Subversion via Homebrew and pick that up instead.
2010-07-08 22:45:03 -07:00

30 lines
919 B
Ruby

require 'formula'
class Mplayer <Formula
homepage 'http://www.mplayerhq.hu/'
# http://github.com/mxcl/homebrew/issues/issue/87
head 'svn://svn.mplayerhq.hu/mplayer/trunk', :using => StrictSubversionDownloadStrategy
depends_on 'pkg-config' => :recommended
depends_on 'yasm' => :optional
def install
# Do not use pipes, per bug report
# http://github.com/mxcl/homebrew/issues#issue/622
# and MacPorts
# http://trac.macports.org/browser/trunk/dports/multimedia/mplayer-devel/Portfile
# any kind of optimisation breaks the build
ENV.gcc_4_2
ENV['CC'] = ''
ENV['LD'] = ''
ENV['CFLAGS'] = ''
ENV['CXXFLAGS'] = ''
args = ["--prefix=#{prefix}", "--enable-largefiles", "--enable-apple-remote"]
args << "--target=x86_64-Darwin" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
system './configure', *args
system "make"
system "make install"
end
end