Skip to content

Instantly share code, notes, and snippets.

@lfranchi
Created May 12, 2011 09:20
Show Gist options
  • Save lfranchi/968230 to your computer and use it in GitHub Desktop.
Save lfranchi/968230 to your computer and use it in GitHub Desktop.
require 'formula'
class VlcGit < Formula
head 'git://git.videolan.org/vlc/vlc-1.1.git'
homepage 'http://www.videolan.org/vlc'
depends_on 'pcre'
depends_on 'gettext'
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']}"
exp = "export #{cc}; export #{cxx}; export #{objc}; export #{ldf}; export #{cfl}"
# Additional Libs
system "#{exp}; cd extras/contrib; ./bootstrap x86_64-apple-darwin10"
system "#{exp}; cd extras/contrib; make"
# VLC
system "#{exp}; ./bootstrap"
system "#{exp}; ./configure --enable-merge-ffmpeg --enable-debug --disable-asa --enable-macosx --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk --build=x86_64-apple-darwin10 --prefix=#{prefix}"
# system "cmake . #{std_cmake_parameters}"
system "#{exp}; make install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment