diff options
| author | David Christenson | 2014-05-12 05:05:23 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-05-13 18:29:49 -0500 |
| commit | abbc7391c06149434aa96b091fc2df4912ad9be2 (patch) | |
| tree | 0097f88880bd77e6f0aefcc7e72d05f080e993b0 /Library | |
| parent | 5a4d14f9db576393515a454cc55093d2356a60ba (diff) | |
| download | homebrew-abbc7391c06149434aa96b091fc2df4912ad9be2.tar.bz2 | |
mkvtoolnix: add option to enable GUI
Compile the wxwidgets GUI for mkvtoolnix.
Closes #29178.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/mkvtoolnix.rb | 80 |
1 files changed, 53 insertions, 27 deletions
diff --git a/Library/Formula/mkvtoolnix.rb b/Library/Formula/mkvtoolnix.rb index 33f6ab82f..823347130 100644 --- a/Library/Formula/mkvtoolnix.rb +++ b/Library/Formula/mkvtoolnix.rb @@ -1,4 +1,4 @@ -require 'formula' +require "formula" class Ruby19 < Requirement fatal true @@ -24,28 +24,37 @@ class Ruby19 < Requirement end class Mkvtoolnix < Formula - homepage 'http://www.bunkus.org/videotools/mkvtoolnix/' - url 'http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-6.9.1.tar.xz' - sha1 '6c62d91663fd382b0b66da6548eea5a5c37f8128' + homepage "http://www.bunkus.org/videotools/mkvtoolnix/" + url "http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-6.9.1.tar.xz" + sha1 "6c62d91663fd382b0b66da6548eea5a5c37f8128" - head 'https://github.com/mbunkus/mkvtoolnix.git' + head do + url "https://github.com/mbunkus/mkvtoolnix.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end - depends_on 'pkg-config' => :build + depends_on "pkg-config" => :build depends_on Ruby19 - depends_on 'libogg' - depends_on 'libvorbis' - depends_on 'flac' => :optional - depends_on 'lzo' => :optional + depends_on "libogg" + depends_on "libvorbis" + depends_on "flac" => :optional + depends_on "lzo" => :optional + depends_on "expat" + depends_on "gettext" + depends_on "pcre" + depends_on "wxmac" => :optional # On Mavericks, the bottle (without c++11) can be used # because mkvtoolnix is linked against libc++ by default if MacOS.version >= 10.9 - depends_on 'boost' - depends_on 'libmatroska' - depends_on 'libebml' + depends_on "boost" + depends_on "libmatroska" + depends_on "libebml" else - depends_on 'boost' => 'c++11' - depends_on 'libmatroska' => 'c++11' - depends_on 'libebml' => 'c++11' + depends_on "boost" => "c++11" + depends_on "libmatroska" => "c++11" + depends_on "libebml" => "c++11" end needs :cxx11 @@ -53,21 +62,38 @@ class Mkvtoolnix < Formula def install ENV.cxx11 - ENV['ZLIB_CFLAGS'] = '-I/usr/include' - ENV['ZLIB_LIBS'] = '-L/usr/lib -lz' + ENV["ZLIB_CFLAGS"] = "-I/usr/include" + ENV["ZLIB_LIBS"] = "-L/usr/lib -lz" - boost = Formula["boost"].opt_prefix + boost = Formula["boost"] ogg = Formula["libogg"] vorbis = Formula["libvorbis"] - system "./configure", "--disable-debug", - "--prefix=#{prefix}", - "--disable-gui", - "--disable-wxwidgets", - "--without-curl", - "--with-boost=#{boost}", - "--with-extra-includes=#{ogg.opt_include};#{vorbis.opt_include}", - "--with-extra-libs=#{ogg.opt_lib};#{vorbis.opt_lib}" + args = %W[ + --disable-debug + --prefix=#{prefix} + --without-curl + --with-boost=#{boost.opt_prefix} + ] + + if build.with? "wxmac" + wxmac = Formula["wxmac"] + + args << "--with-extra-includes=#{ogg.opt_include};#{vorbis.opt_include};#{wxmac.opt_include}" + args << "--with-extra-libs=#{ogg.opt_lib};#{vorbis.opt_lib};#{wxmac.opt_lib}" + args << "--enable-gui" + args << "--enable-wxwidgets" + else + args << "--with-extra-includes=#{ogg.opt_include};#{vorbis.opt_include}" + args << "--with-extra-libs=#{ogg.opt_lib};#{vorbis.opt_lib}" + args << "--disable-gui" + args << "--disable-wxwidgets" + end + + system "./autogen.sh" if build.head? + + system "./configure", *args + system "./drake", "-j#{ENV.make_jobs}" system "./drake install" end |
