Advertisement
eartle

vlc 2.0 formula

May 29th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.60 KB | None | 0 0
  1. require 'formula'
  2.  
  3. class Vlc < Formula
  4.   #url 'http://download.videolan.org/pub/videolan/vlc/2.0.1/vlc-2.0.1.tar.xz'
  5.   homepage 'http://www.videolan.org/vlc'
  6.   md5 '5ad114755670e4881a2b35354e2f79bc'
  7.   head 'git://git.videolan.org/vlc/vlc-2.0.git'
  8.  
  9.   depends_on 'automake'
  10.   depends_on 'pcre'
  11.   depends_on 'gettext'
  12.   depends_on 'libgcrypt'
  13.   depends_on 'libshout'
  14.   depends_on 'libmad'
  15.   depends_on 'libtool'
  16.   depends_on 'flac'
  17.  
  18.   def install
  19.     # Compiler
  20.     cc =   "CC=/Developer/usr/bin/llvm-gcc-4.2"
  21.     cxx =  "CXX=/Developer/usr/bin/llvm-g++-4.2"
  22.     objc = "OBJC=/Developer/usr/bin/llvm-gcc-4.2"
  23.  
  24.     # gettext is keg-only so make sure vlc finds it
  25.     gettext = Formula.factory("gettext")
  26.     ldf = "LDFLAGS=-L#{gettext.lib} -lintl"
  27.     cfl = "CFLAGS=-I#{gettext.include}"
  28.     print "Adding libintl directly to the environment: #{ENV['LDFLAGS']} and #{ENV['CFLAGS']}"
  29.  
  30.     path = "PATH=#{pwd}/extras/tools/build/bin:$PATH"
  31.  
  32.     exp = "export #{path}; export #{cc}; export #{cxx}; export #{objc}; export #{ldf}; export #{cfl}"
  33.     # Additional Libs
  34.     system "#{exp}; cd contrib; mkdir -p osx; cd osx; ../bootstrap --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin9"
  35.     system "#{exp}; cd contrib/osx; make prebuilt"
  36.  
  37.     system "touch src/revision.txt"
  38.  
  39.     # VLC
  40.     system "#{exp}; ./bootstrap"
  41.     system "#{exp}; mkdir -p build; cd build; ../extras/package/macosx/configure.sh --disable-asa --enable-macosx --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk -host=x86_64-apple-darwin10 --build=x86_64-apple-darwin9 --prefix=#{prefix}"
  42.     system "#{exp}; cd build; make install"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement