aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/mplayer.rb
blob: 3e6786e7af12f0abac76a20a10455eedc5fafe77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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' => :build
  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 snow_leopard_64?

    system './configure', *args
    system "make"
    system "make install"
  end
end