2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-08-12 00:29:24 +00:00
|
|
|
|
|
|
|
class Mplayer <Formula
|
2009-12-07 15:31:51 +00:00
|
|
|
homepage 'http://www.mplayerhq.hu/'
|
|
|
|
head 'svn://svn.mplayerhq.hu/mplayer/trunk'
|
|
|
|
|
2009-10-06 04:09:57 +00:00
|
|
|
depends_on 'pkg-config' => :recommended
|
2009-08-12 00:29:24 +00:00
|
|
|
|
2009-12-02 12:26:51 +00:00
|
|
|
# http://github.com/mxcl/homebrew/issues/#issue/87
|
|
|
|
depends_on :subversion if MACOS_VERSION < 10.6
|
|
|
|
|
2009-08-12 00:29:24 +00:00
|
|
|
def install
|
2009-12-07 15:31:51 +00:00
|
|
|
# LLVM-2206 can't handle some of the assembly
|
|
|
|
# Using gcc_4_2 doesn't work, failing mysteriously (check this again)
|
|
|
|
ENV['CC'] = ''
|
|
|
|
ENV['LD'] = ''
|
|
|
|
# any kind of optimisation breaks the build
|
2009-12-31 02:12:50 +00:00
|
|
|
ENV['CFLAGS'] = '-w -pipe'
|
2009-12-07 15:31:51 +00:00
|
|
|
|
|
|
|
args = ['./configure', "--prefix=#{prefix}"]
|
|
|
|
args << "--target=x86_64-Darwin" if Hardware.is_64_bit? and MACOS_VERSION >= 10.6
|
|
|
|
|
|
|
|
system *args
|
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
|
|
|
|
|
|
|
|
if MACOS_VERSION < 10.6
|
|
|
|
class SubversionDownloadStrategy
|
|
|
|
def svn
|
|
|
|
Formula.factory('subversion').bin+'svn'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|