diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mplayer.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Library/Formula/mplayer.rb b/Library/Formula/mplayer.rb index 0c2dd3716..4cb74410b 100644 --- a/Library/Formula/mplayer.rb +++ b/Library/Formula/mplayer.rb @@ -7,9 +7,12 @@ class Mplayer < Formula head 'svn://svn.mplayerhq.hu/mplayer/trunk', :using => StrictSubversionDownloadStrategy + option 'with-x', 'Build with X11 support' + depends_on 'pkg-config' => :build depends_on 'yasm' => :build depends_on 'xz' => :build + depends_on :x11 if build.include? 'with-x' fails_with :clang do build 211 @@ -19,7 +22,7 @@ class Mplayer < Formula def patches # When building SVN, configure prompts the user to pull FFmpeg from git. # Don't do that. - DATA if ARGV.build_head? + DATA if build.head? end def install @@ -38,11 +41,17 @@ class Mplayer < Formula # Disable openjpeg because it defines int main(), which hides mplayer's main(). # This issue was reported upstream against openjpeg 1.5.0: # http://code.google.com/p/openjpeg/issues/detail?id=152 - system './configure', "--prefix=#{prefix}", - "--cc=#{ENV.cc}", - "--host-cc=#{ENV.cc}", - "--disable-cdparanoia", - "--disable-libopenjpeg" + args = %W[ + --prefix=#{prefix} + --cc=#{ENV.cc} + --host-cc=#{ENV.cc} + --disable-cdparanoia + --disable-libopenjpeg + ] + + args << "--disable-x11" unless build.include? 'with-x' + + system "./configure", *args system "make" system "make install" end |
