forked from tomahawk-player/homebrew-tomahawk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,37 +1,47 @@ | |||
require 'formula' | require 'formula' | ||
|
|
||
class Vlc < Formula | class Vlc < Formula | ||
url 'http://download.videolan.org/pub/videolan/vlc/1.1.12/vlc-1.1.12.tar.bz2' | # This is a HEAD only formula. the VLC guys say their tarballs are currently having build problems | ||
homepage 'http://www.videolan.org/vlc' | homepage 'http://www.videolan.org/vlc' | ||
md5 '91de1ad308c947e35380f9d747ff5713' | head 'git://git.videolan.org/vlc/vlc-2.0.git' | ||
|
|
||
depends_on 'automake' | |||
depends_on 'pcre' | depends_on 'pcre' | ||
depends_on 'gettext' | depends_on 'gettext' | ||
depends_on 'libgcrypt' | depends_on 'libgcrypt' | ||
depends_on 'libshout' | depends_on 'libshout' | ||
depends_on 'libmad' | depends_on 'libmad' | ||
depends_on 'libtool' | |||
depends_on 'flac' | depends_on 'flac' | ||
|
|
||
def install | def install | ||
# Compiler | # Compiler | ||
cc = "CC=/Developer/usr/bin/llvm-gcc-4.2" | cc = "CC=/Developer/usr/bin/llvm-gcc-4.2" | ||
cxx = "CXX=/Developer/usr/bin/llvm-g++-4.2" | cxx = "CXX=/Developer/usr/bin/llvm-g++-4.2" | ||
objc = "OBJC=/Developer/usr/bin/llvm-gcc-4.2" | objc = "OBJC=/Developer/usr/bin/llvm-gcc-4.2" | ||
|
|||
# gettext is keg-only so make sure vlc finds it | # gettext is keg-only so make sure vlc finds it | ||
gettext = Formula.factory("gettext") | gettext = Formula.factory("gettext") | ||
ldf = "LDFLAGS=-L#{gettext.lib} -lintl" | ldf = "LDFLAGS=-L#{gettext.lib} -lintl" | ||
cfl = "CFLAGS=-I#{gettext.include}" | cfl = "CFLAGS=-I#{gettext.include}" | ||
print "Adding libintl directly to the environment: #{ENV['LDFLAGS']} and #{ENV['CFLAGS']}" | print "Adding libintl directly to the environment: #{ENV['LDFLAGS']} and #{ENV['CFLAGS']}" | ||
|
|
||
exp = "export #{cc}; export #{cxx}; export #{objc}; export #{ldf}; export #{cfl}" | # this is need to find some m4 macros installed by homebrew's pkg-config | ||
aclocal = "ACLOCAL_ARGS=\"/usr/local/share/aclocal\"" | |||
|
|||
exp = "export #{path}; export #{aclocal}; export #{cc}; export #{cxx}; export #{objc}; export #{ldf}; export #{cfl}" | |||
|
|||
# Additional Libs | # Additional Libs | ||
system "#{exp}; cd extras/contrib; ./bootstrap x86_64-apple-darwin10" | system "#{exp}; cd contrib; mkdir -p osx; cd osx; ../bootstrap --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin9" | ||
system "#{exp}; cd extras/contrib; make" | system "#{exp}; cd contrib/osx; make prebuilt" | ||
|
|||
# HACK: This file is normally created by the build query git log, but homebrew appears | |||
# to remove the .git folder just create a blank file so that this step passes | |||
system "touch src/revision.txt" | |||
|
|
||
# VLC | # VLC | ||
system "#{exp}; ./bootstrap" | 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 "#{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}; make install" | system "#{exp}; cd build; make install" | ||
end | end | ||
end | end |