Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'formula'
- class Vlc < Formula
- #url 'http://download.videolan.org/pub/videolan/vlc/2.0.1/vlc-2.0.1.tar.xz'
- homepage 'http://www.videolan.org/vlc'
- md5 '5ad114755670e4881a2b35354e2f79bc'
- head 'git://git.videolan.org/vlc/vlc-2.0.git'
- depends_on 'automake'
- depends_on 'pcre'
- depends_on 'gettext'
- depends_on 'libgcrypt'
- depends_on 'libshout'
- depends_on 'libmad'
- depends_on 'libtool'
- depends_on 'flac'
- def install
- # Compiler
- cc = "CC=/Developer/usr/bin/llvm-gcc-4.2"
- cxx = "CXX=/Developer/usr/bin/llvm-g++-4.2"
- objc = "OBJC=/Developer/usr/bin/llvm-gcc-4.2"
- # gettext is keg-only so make sure vlc finds it
- gettext = Formula.factory("gettext")
- ldf = "LDFLAGS=-L#{gettext.lib} -lintl"
- cfl = "CFLAGS=-I#{gettext.include}"
- print "Adding libintl directly to the environment: #{ENV['LDFLAGS']} and #{ENV['CFLAGS']}"
- path = "PATH=#{pwd}/extras/tools/build/bin:$PATH"
- exp = "export #{path}; export #{cc}; export #{cxx}; export #{objc}; export #{ldf}; export #{cfl}"
- # Additional Libs
- system "#{exp}; cd contrib; mkdir -p osx; cd osx; ../bootstrap --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin9"
- system "#{exp}; cd contrib/osx; make prebuilt"
- system "touch src/revision.txt"
- # VLC
- system "#{exp}; ./bootstrap"
- 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}"
- system "#{exp}; cd build; make install"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement