Skip to content

Commit

Permalink
mkvtoolnix 7.3.0
Browse files Browse the repository at this point in the history
Update to latest stable release, add option to build experimental QT
GUI, add libmagic as recommended dependency, upgrade flac dependency to
recommended, downgrade gettext dependency to optional, remove
unnecessary configure options locating ogg and vorbis, change format of
`drake install` command, add description of wxWidgets option.
  • Loading branch information
Noctem authored and MikeMcQuaid committed Oct 25, 2014
1 parent cb4622b commit bda4a41
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions Formula/mkvtoolnix.rb
Expand Up @@ -25,8 +25,8 @@ def message; <<-EOS.undent

class Mkvtoolnix < Formula
homepage "https://www.bunkus.org/videotools/mkvtoolnix/"
url "https://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-7.2.0.tar.xz"
sha1 "b8e688c274d0946faea390d626147c357583e8bc"
url "https://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-7.3.0.tar.xz"
sha1 "c5379fa684a0a5e6cf0db7404b72e7075989a1a3"

bottle do
sha1 "ff8ace4ece6cab820a40bc8f6761f4191ca7537c" => :yosemite
Expand All @@ -41,16 +41,21 @@ class Mkvtoolnix < Formula
depends_on "libtool" => :build
end

option "with-wxmac", "Build with wxWidgets GUI"
option "with-qt5", "Build with experimental QT GUI"

depends_on "pkg-config" => :build
depends_on Ruby19
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 "flac" => :recommended
depends_on "libmagic" => :recommended
depends_on "lzo" => :optional
depends_on "wxmac" => :optional
depends_on "qt5" => :optional
depends_on "gettext" => :optional
# On Mavericks, the bottle (without c++11) can be used
# because mkvtoolnix is linked against libc++ by default
if MacOS.version >= "10.9"
Expand All @@ -72,8 +77,6 @@ def install
ENV["ZLIB_LIBS"] = "-L/usr/lib -lz"

boost = Formula["boost"]
ogg = Formula["libogg"]
vorbis = Formula["libvorbis"]

args = %W[
--disable-debug
Expand All @@ -85,23 +88,28 @@ def install
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

if build.with?("qt5")
qt5 = Formula["qt5"]

args << "--with-moc=#{qt5.opt_bin}/moc"
args << "--with-uic=#{qt5.opt_bin}/uic"
args << "--with-rcc=#{qt5.opt_bin}/rcc"
args << "--with-mkvtoolnix-gui"
args << "--enable-qt"
end

system "./autogen.sh" if build.head?

system "./configure", *args

system "./drake", "-j#{ENV.make_jobs}"
system "./drake install"
system "./drake", "install"
end

test do
Expand Down

0 comments on commit bda4a41

Please sign in to comment.