diff options
| author | dinkypumpkin | 2012-08-30 19:53:05 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-30 13:30:00 -0700 |
| commit | 051f9421bab8416424d1fcf8d70090ade46285df (patch) | |
| tree | 8a616b7829eb07ef6b47b64fc062977d04e164a1 /Library/Formula | |
| parent | bde601af38f5b8976281ee586e87b2068005ee33 (diff) | |
| download | homebrew-051f9421bab8416424d1fcf8d70090ade46285df.tar.bz2 | |
mkvtoolnix: patch to build with #define foreach BOOST_FOREACH
mkvtoolnix uses #define foreach BOOST_FOREACH, which breaks the build
due to an issue with header file ordering. Boost 1.49 was patched
to avoid this issue, but the patch was removed in 1.50, so the mkvtoolnix
build must provide a workaround.
See: https://svn.boost.org/trac/boost/ticket/6131
Closes #14568.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/mkvtoolnix.rb | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/Library/Formula/mkvtoolnix.rb b/Library/Formula/mkvtoolnix.rb index 916c8d6b2..b6c5928b8 100644 --- a/Library/Formula/mkvtoolnix.rb +++ b/Library/Formula/mkvtoolnix.rb @@ -1,10 +1,11 @@ require 'formula' class Mkvtoolnix < Formula + homepage 'http://www.bunkus.org/videotools/mkvtoolnix/' url 'http://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-5.0.1.tar.bz2' sha1 '900211d47ba6cbeb4188bb45a492a2b9edf08ed2' + head 'https://github.com/mbunkus/mkvtoolnix.git' - homepage 'http://www.bunkus.org/videotools/mkvtoolnix/' depends_on 'boost' depends_on 'libvorbis' @@ -14,6 +15,13 @@ class Mkvtoolnix < Formula fails_with :clang do build 318 + 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? end def install @@ -25,3 +33,25 @@ class Mkvtoolnix < Formula system "./drake install" end end + +__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()) |
