Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-cpp/libxsd-frontend/files: 1.17.0-boost-filesystem-v2-deprecation.patch
Date: Thu, 23 Aug 2012 13:19:49
Message-Id: 20120823131938.E14FF2046A@flycatcher.gentoo.org
1 dev-zero 12/08/23 13:19:38
2
3 Added: 1.17.0-boost-filesystem-v2-deprecation.patch
4 Log:
5 Fix compatibility with boost >=1.49.0 (filesystem v2 gone), bug #424761.
6
7 (Portage version: 2.1.11.9/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-cpp/libxsd-frontend/files/1.17.0-boost-filesystem-v2-deprecation.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-cpp/libxsd-frontend/files/1.17.0-boost-filesystem-v2-deprecation.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-cpp/libxsd-frontend/files/1.17.0-boost-filesystem-v2-deprecation.patch?rev=1.1&content-type=text/plain
14
15 Index: 1.17.0-boost-filesystem-v2-deprecation.patch
16 ===================================================================
17 diff -Naurb -I '^//' -I '^# copyright' -x build libxsd-frontend-1.17.0/tests/dump/driver.cxx xsd-3.3.0-2+dep/libxsd-frontend/tests/dump/driver.cxx
18 --- libxsd-frontend-1.17.0/tests/dump/driver.cxx 2010-04-27 21:31:24.000000000 +0200
19 +++ xsd-3.3.0-2+dep/libxsd-frontend/tests/dump/driver.cxx 2012-08-23 11:30:16.074750804 +0200
20 @@ -586,7 +586,11 @@
21
22 // Parse schema.
23 //
24 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
25 SemanticGraph::Path path (argv[i], boost::filesystem::native);
26 +#else
27 + SemanticGraph::Path path (argv[i]);
28 +#endif
29
30 Parser parser (true, false, true);
31 Evptr<SemanticGraph::Schema> tu (parser.parse (path));
32 diff -Naurb -I '^//' -I '^# copyright' -x build libxsd-frontend-1.17.0/xsd-frontend/parser.cxx xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/parser.cxx
33 --- libxsd-frontend-1.17.0/xsd-frontend/parser.cxx 2010-04-27 21:31:24.000000000 +0200
34 +++ xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/parser.cxx 2012-06-03 11:02:29.000000000 +0200
35 @@ -1274,7 +1274,11 @@
36 operator () (SemanticGraph::Path const& x,
37 SemanticGraph::Path const& y) const
38 {
39 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
40 return x.native_file_string () < y.native_file_string ();
41 +#else
42 + return x.string () < y.string ();
43 +#endif
44 }
45 };
46
47 @@ -1627,9 +1631,15 @@
48 friend Boolean
49 operator< (SchemaId const& x, SchemaId const& y)
50 {
51 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
52 return x.path_.native_file_string () < y.path_.native_file_string ()
53 || (x.path_.native_file_string () == y.path_.native_file_string ()
54 && x.ns_ < y.ns_);
55 +#else
56 + return x.path_.string () < y.path_.string ()
57 + || (x.path_.string () == y.path_.string ()
58 + && x.ns_ < y.ns_);
59 +#endif
60 }
61
62 private:
63 @@ -2376,6 +2386,7 @@
64 Path path, rel_path, abs_path;
65 try
66 {
67 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
68 try
69 {
70 path = Path (loc);
71 @@ -2386,6 +2397,10 @@
72 //
73 path = Path (loc, boost::filesystem::native);
74 }
75 +#else
76 + // The new ABI does not have a fallback native representation
77 + path = Path (loc.c_str());
78 +#endif
79
80 if (path.is_complete ())
81 {
82 @@ -2479,6 +2494,7 @@
83 Path path, rel_path, abs_path;
84 try
85 {
86 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
87 try
88 {
89 path = Path (loc);
90 @@ -2489,6 +2505,10 @@
91 //
92 path = Path (loc, boost::filesystem::native);
93 }
94 +#else
95 + // The new API does not have a fallback native representation.
96 + path = Path (loc.c_str());
97 +#endif
98
99 if (path.is_complete ())
100 {
101 @@ -4674,9 +4694,14 @@
102 return true;
103
104
105 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
106 XSDFrontend::SemanticGraph::Path abs_path (
107 XML::transcode_to_narrow (e.getLocation ()->getURI ()),
108 boost::filesystem::native);
109 +#else
110 + XSDFrontend::SemanticGraph::Path abs_path (
111 + XML::transcode_to_narrow (e.getLocation ()->getURI ()).c_str());
112 +#endif
113
114 XSDFrontend::SemanticGraph::Path rel_path (ctx_.file (abs_path));
115
116 @@ -4729,8 +4754,12 @@
117 base_ (base),
118 ctx_ (ctx)
119 {
120 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
121 setSystemId (XML::XMLChString (
122 String (abs_.native_file_string ())).c_str ());
123 +#else
124 + setSystemId (XML::XMLChString (String (abs_.string ())).c_str ());
125 +#endif
126 }
127
128 virtual Xerces::BinInputStream*
129 @@ -4803,8 +4832,12 @@
130
131 // base_uri should be a valid path by now.
132 //
133 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
134 Path base (XML::transcode_to_narrow (base_uri),
135 boost::filesystem::native);
136 +#else
137 + Path base (XML::transcode_to_narrow (base_uri).c_str());
138 +#endif
139
140 if (prv_id == 0)
141 {
142 @@ -4830,6 +4863,7 @@
143 {
144 Path path;
145
146 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
147 try
148 {
149 path = Path (path_str);
150 @@ -4840,6 +4874,10 @@
151 //
152 path = Path (path_str, boost::filesystem::native);
153 }
154 +#else
155 + // The new ABI does not have a fallback native representation
156 + path = Path (path_str.c_str());
157 +#endif
158
159 Path base_dir (base.branch_path ());
160
161 diff -Naurb -I '^//' -I '^# copyright' -x build libxsd-frontend-1.17.0/xsd-frontend/semantic-graph/elements.cxx xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx
162 --- libxsd-frontend-1.17.0/xsd-frontend/semantic-graph/elements.cxx 2010-04-27 21:31:24.000000000 +0200
163 +++ xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx 2012-06-03 11:02:29.000000000 +0200
164 @@ -342,5 +342,9 @@
165 std::wostream&
166 operator<< (std::wostream& os, XSDFrontend::SemanticGraph::Path const& path)
167 {
168 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
169 return os << path.native_file_string ().c_str ();
170 +#else
171 + return os << path.string ().c_str ();
172 +#endif
173 }
174 diff -Naurb -I '^//' -I '^# copyright' -x build libxsd-frontend-1.17.0/xsd-frontend/transformations/anonymous.cxx xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx
175 --- libxsd-frontend-1.17.0/xsd-frontend/transformations/anonymous.cxx 2010-04-27 21:31:24.000000000 +0200
176 +++ xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/anonymous.cxx 2012-06-03 11:02:29.000000000 +0200
177 @@ -275,7 +275,11 @@
178 }
179 catch (SemanticGraph::InvalidPath const&)
180 {
181 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
182 file_str = file.native_file_string ();
183 +#else
184 + file_str = file.string ();
185 +#endif
186 }
187
188 String name (
189 @@ -358,7 +362,11 @@
190 }
191 catch (SemanticGraph::InvalidPath const&)
192 {
193 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
194 file_str = file.native_file_string ();
195 +#else
196 + file_str = file.string ();
197 +#endif
198 }
199 }
200
201 @@ -441,7 +449,11 @@
202 }
203 catch (SemanticGraph::InvalidPath const&)
204 {
205 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
206 file_str = file.native_file_string ();
207 +#else
208 + file_str = file.string ();
209 +#endif
210 }
211
212 String name (
213 @@ -639,7 +651,11 @@
214 }
215 catch (SemanticGraph::InvalidPath const&)
216 {
217 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
218 file_str = file.native_file_string ();
219 +#else
220 + file_str = file.string ();
221 +#endif
222 }
223
224 String name (
225 diff -Naurb -I '^//' -I '^# copyright' -x build libxsd-frontend-1.17.0/xsd-frontend/transformations/schema-per-type.cxx xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx
226 --- libxsd-frontend-1.17.0/xsd-frontend/transformations/schema-per-type.cxx 2010-04-27 21:31:24.000000000 +0200
227 +++ xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/schema-per-type.cxx 2012-06-03 11:02:29.000000000 +0200
228 @@ -167,7 +167,11 @@
229
230 try
231 {
232 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
233 path = Path (file_name);
234 +#else
235 + path = Path (file_name.c_str());
236 +#endif
237 }
238 catch (InvalidPath const&)
239 {
240 @@ -349,6 +353,7 @@
241 //
242 NarrowString abs_path;
243
244 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
245 // Try to use the portable representation of the path. If that
246 // fails, fall back to the native representation.
247 //
248 @@ -360,9 +365,17 @@
249 {
250 abs_path = path.native_file_string ();
251 }
252 +#else
253 + // The new ABI does not have a fallback native representation
254 + abs_path = path.string ();
255 +#endif
256
257 NarrowString tf (trans_.translate_schema (abs_path));
258 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
259 NarrowString file (tf ? tf : path.leaf ());
260 +#else
261 + NarrowString file (tf ? tf : path.filename ().string());
262 +#endif
263
264 Size p (file.rfind ('.'));
265 NarrowString ext (
266 @@ -389,7 +402,11 @@
267
268 try
269 {
270 +#if !defined(BOOST_FILESYSTEM_VERSION) || BOOST_FILESYSTEM_VERSION == 2
271 (*i)->context ().set ("renamed", SemanticGraph::Path (new_name));
272 +#else
273 + (*i)->context ().set ("renamed", SemanticGraph::Path (new_name.c_str()));
274 +#endif
275 }
276 catch (SemanticGraph::InvalidPath const&)
277 {