2010-03-29 18:03:14 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mkvtoolnix < Formula
|
2012-08-30 18:53:05 +00:00
|
|
|
homepage 'http://www.bunkus.org/videotools/mkvtoolnix/'
|
2011-10-11 03:20:38 +00:00
|
|
|
url 'http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-5.0.1.tar.bz2'
|
|
|
|
sha1 '900211d47ba6cbeb4188bb45a492a2b9edf08ed2'
|
2012-08-30 18:53:05 +00:00
|
|
|
|
2011-05-27 05:02:55 +00:00
|
|
|
head 'https://github.com/mbunkus/mkvtoolnix.git'
|
2010-03-29 18:03:14 +00:00
|
|
|
|
|
|
|
depends_on 'boost'
|
|
|
|
depends_on 'libvorbis'
|
|
|
|
depends_on 'libmatroska'
|
|
|
|
depends_on 'flac' => :optional
|
|
|
|
depends_on 'lzo' => :optional
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 318
|
2012-08-30 18:53:05 +00:00
|
|
|
cause "Compilation errors with older clang."
|
|
|
|
end
|
|
|
|
|
|
|
|
# Patch to build with #define foreach BOOST_FOREACH
|
|
|
|
# See: https://svn.boost.org/trac/boost/ticket/6131
|
|
|
|
def patches
|
|
|
|
DATA unless build.head?
|
2012-03-18 20:33:24 +00:00
|
|
|
end
|
|
|
|
|
2010-03-29 18:03:14 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
2010-06-07 07:56:23 +00:00
|
|
|
"--with-boost-libdir=#{HOMEBREW_PREFIX}/lib", # For non-/usr/local prefix
|
2010-09-07 09:11:31 +00:00
|
|
|
"--with-boost-regex=boost_regex-mt" # via macports
|
2012-05-15 18:31:21 +00:00
|
|
|
system "./drake", "-j#{ENV.make_jobs}"
|
2010-09-07 09:11:31 +00:00
|
|
|
system "./drake install"
|
2010-03-29 18:03:14 +00:00
|
|
|
end
|
|
|
|
end
|
2012-08-30 18:53:05 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/common/common.h b/src/common/common.h
|
|
|
|
index 16f7177..8e9e053 100644
|
|
|
|
--- a/src/common/common.h
|
|
|
|
+++ b/src/common/common.h
|
|
|
|
@@ -17,7 +17,6 @@
|
|
|
|
#undef min
|
|
|
|
#undef max
|
|
|
|
|
|
|
|
-#include <boost/foreach.hpp>
|
|
|
|
#include <boost/format.hpp>
|
|
|
|
#include <boost/regex.hpp>
|
|
|
|
#include <string>
|
|
|
|
@@ -83,6 +82,7 @@ extern unsigned int MTX_DLL_API verbose;
|
|
|
|
|
|
|
|
#define foreach BOOST_FOREACH
|
|
|
|
#define reverse_foreach BOOST_REVERSE_FOREACH
|
|
|
|
+#include <boost/foreach.hpp>
|
|
|
|
#define mxforeach(it, vec) for (it = (vec).begin(); it != (vec).end(); it++)
|
|
|
|
#define mxfind(value, cont) std::find(cont.begin(), cont.end(), value)
|
|
|
|
#define mxfind2(it, value, cont) ((it = std::find((cont).begin(), (cont).end(), value)) != (cont).end())
|