Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/opencv/files: opencv-2.3.1a-True-False.patch
Date: Sat, 31 Dec 2011 22:17:29
Message-Id: 20111231221719.B190E2004C@flycatcher.gentoo.org
1 dilfridge 11/12/31 22:17:19
2
3 Added: opencv-2.3.1a-True-False.patch
4 Log:
5 Added the True/False patch, kinda makes sense. Let's hope upstream follows. Bug 393685.
6
7 (Portage version: 2.1.10.41/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-libs/opencv/files/opencv-2.3.1a-True-False.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/opencv/files/opencv-2.3.1a-True-False.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/opencv/files/opencv-2.3.1a-True-False.patch?rev=1.1&content-type=text/plain
14
15 Index: opencv-2.3.1a-True-False.patch
16 ===================================================================
17 diff -ur OpenCV-2.3.1.orig/modules/flann/include/opencv2/flann/all_indices.h OpenCV-2.3.1/modules/flann/include/opencv2/flann/all_indices.h
18 --- OpenCV-2.3.1.orig/modules/flann/include/opencv2/flann/all_indices.h 2011-09-12 13:42:27.000000000 -0500
19 +++ OpenCV-2.3.1/modules/flann/include/opencv2/flann/all_indices.h 2011-12-08 15:54:23.000000000 -0600
20 @@ -88,7 +88,7 @@
21 };
22
23 template<typename VectorSpace, typename Distance>
24 -struct index_creator<False,VectorSpace,Distance>
25 +struct index_creator<XFalse,VectorSpace,Distance>
26 {
27 static NNIndex<Distance>* create(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)
28 {
29 @@ -117,7 +117,7 @@
30 };
31
32 template<typename Distance>
33 -struct index_creator<False,False,Distance>
34 +struct index_creator<XFalse,XFalse,Distance>
35 {
36 static NNIndex<Distance>* create(const Matrix<typename Distance::ElementType>& dataset, const IndexParams& params, const Distance& distance)
37 {
38 diff -ur OpenCV-2.3.1.orig/modules/flann/include/opencv2/flann/dist.h OpenCV-2.3.1/modules/flann/include/opencv2/flann/dist.h
39 --- OpenCV-2.3.1.orig/modules/flann/include/opencv2/flann/dist.h 2011-09-12 13:42:27.000000000 -0500
40 +++ OpenCV-2.3.1/modules/flann/include/opencv2/flann/dist.h 2011-12-08 15:54:11.000000000 -0600
41 @@ -79,11 +79,11 @@
42 struct Accumulator<int> { typedef float Type; };
43
44
45 -class True
46 +class XTrue
47 {
48 };
49
50 -class False
51 +class XFalse
52 {
53 };
54
55 @@ -97,8 +97,8 @@
56 template<class T>
57 struct L2_Simple
58 {
59 - typedef True is_kdtree_distance;
60 - typedef True is_vector_space_distance;
61 + typedef XTrue is_kdtree_distance;
62 + typedef XTrue is_vector_space_distance;
63
64 typedef T ElementType;
65 typedef typename Accumulator<T>::Type ResultType;
66 @@ -130,8 +130,8 @@
67 template<class T>
68 struct L2
69 {
70 - typedef True is_kdtree_distance;
71 - typedef True is_vector_space_distance;
72 + typedef XTrue is_kdtree_distance;
73 + typedef XTrue is_vector_space_distance;
74
75 typedef T ElementType;
76 typedef typename Accumulator<T>::Type ResultType;
77 @@ -195,8 +195,8 @@
78 template<class T>
79 struct L1
80 {
81 - typedef True is_kdtree_distance;
82 - typedef True is_vector_space_distance;
83 + typedef XTrue is_kdtree_distance;
84 + typedef XTrue is_vector_space_distance;
85
86 typedef T ElementType;
87 typedef typename Accumulator<T>::Type ResultType;
88 @@ -252,8 +252,8 @@
89 template<class T>
90 struct MinkowskiDistance
91 {
92 - typedef True is_kdtree_distance;
93 - typedef True is_vector_space_distance;
94 + typedef XTrue is_kdtree_distance;
95 + typedef XTrue is_vector_space_distance;
96
97 typedef T ElementType;
98 typedef typename Accumulator<T>::Type ResultType;
99 @@ -316,8 +316,8 @@
100 template<class T>
101 struct MaxDistance
102 {
103 - typedef False is_kdtree_distance;
104 - typedef True is_vector_space_distance;
105 + typedef XFalse is_kdtree_distance;
106 + typedef XTrue is_vector_space_distance;
107
108 typedef T ElementType;
109 typedef typename Accumulator<T>::Type ResultType;
110 @@ -373,8 +373,8 @@
111 */
112 struct HammingLUT
113 {
114 - typedef False is_kdtree_distance;
115 - typedef False is_vector_space_distance;
116 + typedef XFalse is_kdtree_distance;
117 + typedef XFalse is_vector_space_distance;
118
119 typedef unsigned char ElementType;
120 typedef int ResultType;
121 @@ -475,8 +475,8 @@
122 template<class T>
123 struct Hamming
124 {
125 - typedef False is_kdtree_distance;
126 - typedef False is_vector_space_distance;
127 + typedef XFalse is_kdtree_distance;
128 + typedef XFalse is_vector_space_distance;
129
130
131 typedef T ElementType;
132 @@ -537,8 +537,8 @@
133 template<typename T>
134 struct Hamming2
135 {
136 - typedef False is_kdtree_distance;
137 - typedef False is_vector_space_distance;
138 + typedef XFalse is_kdtree_distance;
139 + typedef XFalse is_vector_space_distance;
140
141 typedef T ElementType;
142 typedef int ResultType;
143 @@ -596,8 +596,8 @@
144 template<class T>
145 struct HistIntersectionDistance
146 {
147 - typedef True is_kdtree_distance;
148 - typedef True is_vector_space_distance;
149 + typedef XTrue is_kdtree_distance;
150 + typedef XTrue is_vector_space_distance;
151
152 typedef T ElementType;
153 typedef typename Accumulator<T>::Type ResultType;
154 @@ -649,8 +649,8 @@
155 template<class T>
156 struct HellingerDistance
157 {
158 - typedef True is_kdtree_distance;
159 - typedef True is_vector_space_distance;
160 + typedef XTrue is_kdtree_distance;
161 + typedef XTrue is_vector_space_distance;
162
163 typedef T ElementType;
164 typedef typename Accumulator<T>::Type ResultType;
165 @@ -697,8 +697,8 @@
166 template<class T>
167 struct ChiSquareDistance
168 {
169 - typedef True is_kdtree_distance;
170 - typedef True is_vector_space_distance;
171 + typedef XTrue is_kdtree_distance;
172 + typedef XTrue is_vector_space_distance;
173
174 typedef T ElementType;
175 typedef typename Accumulator<T>::Type ResultType;
176 @@ -751,8 +751,8 @@
177 template<class T>
178 struct KL_Divergence
179 {
180 - typedef True is_kdtree_distance;
181 - typedef True is_vector_space_distance;
182 + typedef XTrue is_kdtree_distance;
183 + typedef XTrue is_vector_space_distance;
184
185 typedef T ElementType;
186 typedef typename Accumulator<T>::Type ResultType;