aboutsummaryrefslogtreecommitdiff
path: root/multimedia/handbrake/files/patch-contrib-mp4v2-P01-freebsd-clang-namespace.patch
blob: 8b1baf17060a9df5bcaaea2070dfac058e530fd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
--- /dev/null	2014-02-09 17:00:00.000000000 +0100
+++ contrib/mp4v2/P01-freebsd-clang-namespace.patch	2014-02-09 16:52:59.124808788 +0100
@@ -0,0 +1,117 @@
+diff -Naur mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp mp4v2-trunk-r355/src/bmff/typebmff.cpp
+--- mp4v2-trunk-r355.orig/src/bmff/typebmff.cpp	2009-05-21 04:52:31.000000000 +0200
++++ mp4v2-trunk-r355/src/bmff/typebmff.cpp	2014-02-06 04:18:15.000000000 +0100
+@@ -23,19 +23,12 @@
+ 
+ #include "impl.h"
+ 
+-// VStudio idiocy prevents defining template instanced static data
+-// in a namespace. Workaround it by defining in global scope.
+-// Other platforms will continue to put things in the proper namespace.
+-#if defined( _MSC_VER )
+-using namespace mp4v2::impl::bmff;
+-#else
+-namespace mp4v2 { namespace impl { namespace bmff {
+-#endif
++namespace mp4v2 { namespace impl { 
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumLanguageCode::Entry EnumLanguageCode::data[] = {
++const bmff::EnumLanguageCode::Entry bmff::EnumLanguageCode::data[] = {
+     { mp4v2::impl::bmff::ILC_AAR,  "aar",  "Afar" },
+     { mp4v2::impl::bmff::ILC_ABK,  "abk",  "Abkhazian" },
+     { mp4v2::impl::bmff::ILC_ACE,  "ace",  "Achinese" },
+@@ -526,9 +519,7 @@
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-#if defined( _MSC_VER )
+-namespace mp4v2 { namespace impl { namespace bmff {
+-#endif
++namespace bmff {
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+diff -Naur mp4v2-trunk-r355.orig/src/itmf/type.cpp mp4v2-trunk-r355/src/itmf/type.cpp
+--- mp4v2-trunk-r355.orig/src/itmf/type.cpp	2009-05-21 04:52:29.000000000 +0200
++++ mp4v2-trunk-r355/src/itmf/type.cpp	2014-02-06 04:18:19.000000000 +0100
+@@ -24,19 +24,12 @@
+ 
+ #include "impl.h"
+ 
+-// VStudio idiocy prevents defining template instanced static data
+-// in a namespace. Workaround it by defining in global scope.
+-// Other platforms will continue to put things in the proper namespace.
+-#if defined( _MSC_VER )
+-using namespace mp4v2::impl::itmf;
+-#else
+-namespace mp4v2 { namespace impl { namespace itmf {
+-#endif
++namespace mp4v2 { namespace impl {
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumBasicType::Entry EnumBasicType::data[] = {
++const itmf::EnumBasicType::Entry itmf::EnumBasicType::data[] = {
+     { mp4v2::impl::itmf::BT_IMPLICIT,  "implicit",  "implicit" },
+     { mp4v2::impl::itmf::BT_UTF8,      "utf8",      "UTF-8" },
+     { mp4v2::impl::itmf::BT_UTF16,     "utf16",     "UTF-16" },
+@@ -64,7 +57,7 @@
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumGenreType::Entry EnumGenreType::data[] = {
++const itmf::EnumGenreType::Entry itmf::EnumGenreType::data[] = {
+     { mp4v2::impl::itmf::GENRE_BLUES,             "blues",             "Blues" },
+     { mp4v2::impl::itmf::GENRE_CLASSIC_ROCK,      "classicrock",       "Classic Rock" },
+     { mp4v2::impl::itmf::GENRE_COUNTRY,           "country",           "Country" },
+@@ -200,7 +193,7 @@
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumStikType::Entry EnumStikType::data[] = {
++const itmf::EnumStikType::Entry itmf::EnumStikType::data[] = {
+     { mp4v2::impl::itmf::STIK_OLD_MOVIE,    "oldmovie",    "Movie" },
+     { mp4v2::impl::itmf::STIK_NORMAL,       "normal",      "Normal" },
+     { mp4v2::impl::itmf::STIK_AUDIOBOOK,    "audiobook",   "Audio Book" },
+@@ -216,7 +209,7 @@
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumAccountType::Entry EnumAccountType::data[] = {
++const itmf::EnumAccountType::Entry itmf::EnumAccountType::data[] = {
+     { mp4v2::impl::itmf::AT_ITUNES,  "itunes",   "iTunes" },
+     { mp4v2::impl::itmf::AT_AOL,     "aol",      "AOL" },
+ 
+@@ -226,7 +219,7 @@
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumCountryCode::Entry EnumCountryCode::data[] = {
++const itmf::EnumCountryCode::Entry itmf::EnumCountryCode::data[] = {
+     { mp4v2::impl::itmf::CC_USA,  "usa",   "United States" },
+     { mp4v2::impl::itmf::CC_USA,  "fra",   "France" },
+     { mp4v2::impl::itmf::CC_DEU,  "ger",   "Germany" },
+@@ -256,7 +249,7 @@
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ template <>
+-const EnumContentRating::Entry EnumContentRating::data[] = {
++const itmf::EnumContentRating::Entry itmf::EnumContentRating::data[] = {
+     { mp4v2::impl::itmf::CR_NONE,      "none",       "None" },
+     { mp4v2::impl::itmf::CR_CLEAN,     "clean",      "Clean" },
+     { mp4v2::impl::itmf::CR_EXPLICIT,  "explicit",   "Explicit" },
+@@ -266,9 +259,7 @@
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+-#if defined( _MSC_VER )
+-namespace mp4v2 { namespace impl { namespace itmf {
+-#endif
++namespace itmf {
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+