File: 2002_libxml%2B%2B.patch

package info (click to toggle)
pinot 1.22-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,604 kB
  • sloc: cpp: 41,857; makefile: 609; xml: 416; sh: 336
file content (528 lines) | stat: -rw-r--r-- 16,869 bytes parent folder | download | duplicates (2)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
Description: use older branch of libxml++
 This essentially reverts upstream git commit 13783b7.
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2024-11-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Core/PinotSettings.cpp
+++ b/Core/PinotSettings.cpp
@@ -61,7 +61,11 @@
 		return "";
 	}
 
-	const TextNode *pText = pElem->get_first_child_text();
+#ifdef HAS_LIBXMLPP026
+	const TextNode *pText = pElem->get_child_content();
+#else
+	const TextNode *pText = pElem->get_child_text();
+#endif
 	if (pText == NULL)
 	{
 		return "";
@@ -77,10 +81,14 @@
 		return NULL;
 	}
 
-	Element *pSubElem = pElem->add_child_element(nodeName);
+	Element *pSubElem = pElem->add_child(nodeName);
 	if (pSubElem != NULL)
 	{
-		pSubElem->set_first_child_text(nodeContent);
+#ifdef HAS_LIBXMLPP026
+		pSubElem->set_child_content(nodeContent);
+#else
+		pSubElem->set_child_text(nodeContent);
+#endif
 	}
 
 	return pSubElem;
@@ -597,7 +605,7 @@
 		}
 
 		// Go through the subnodes
-		Node::NodeList childNodes = pRootElem->get_children();
+		const Node::NodeList childNodes = pRootElem->get_children();
 		if (childNodes.empty() == false)
 		{
 			for (Node::NodeList::const_iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
@@ -726,16 +734,16 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -797,7 +805,7 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
@@ -805,10 +813,10 @@
 
 	string indexName, indexLocation;
 
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -842,16 +850,16 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -884,7 +892,7 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
@@ -896,10 +904,10 @@
 	bool enableMinDate = false, enableMaxDate = false;
 
 	// Load the query's properties
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1126,17 +1134,17 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
 	// Load the label's properties
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1162,17 +1170,17 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
 	// Load the colour RGB components
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1206,16 +1214,16 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1259,7 +1267,7 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
@@ -1268,10 +1276,10 @@
 	IndexableLocation location;
 
 	// Load the indexable location's properties
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1314,17 +1322,17 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
 	}
 
 	// Load the file patterns list
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1360,7 +1368,7 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
@@ -1369,10 +1377,10 @@
 	string name, value;
 
 	// Load the plugin parameters' values 
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1403,7 +1411,7 @@
 		return false;
 	}
 
-	Node::const_NodeList childNodes = pElem->get_children();
+	Node::NodeList childNodes = pElem->get_children();
 	if (childNodes.empty() == true)
 	{
 		return false;
@@ -1412,10 +1420,10 @@
 	CacheProvider cacheProvider;
 
 	// Load the cache provider's properties
-	for (Node::const_NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
+	for (Node::NodeList::iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
 	{
-		const Node *pNode = (*iter);
-		const Element *pChildElem = dynamic_cast<const Element*>(pNode);
+		Node *pNode = (*iter);
+		Element *pChildElem = dynamic_cast<Element*>(pNode);
 		if (pChildElem == NULL)
 		{
 			continue;
@@ -1493,7 +1501,7 @@
 		{
 			addChildElement(pRootElem, "warnaboutversion", (m_warnAboutVersion ? "YES" : "NO"));
 			// User interface position and size
-			pElem = pRootElem->add_child_element("ui");
+			pElem = pRootElem->add_child("ui");
 			if (pElem == NULL)
 			{
 				return false;
@@ -1518,7 +1526,7 @@
 					continue;
 				}
 
-				pElem = pRootElem->add_child_element("extraindex");
+				pElem = pRootElem->add_child("extraindex");
 				if (pElem == NULL)
 				{
 					return false;
@@ -1533,7 +1541,7 @@
 				// Only save those whose group was collapsed
 				if (channelIter->second == false)
 				{
-					pElem = pRootElem->add_child_element("channel");
+					pElem = pRootElem->add_child("channel");
 					if (pElem == NULL)
 					{
 						return false;
@@ -1545,7 +1553,7 @@
 			for (map<string, QueryProperties>::iterator queryIter = m_queries.begin();
 				queryIter != m_queries.end(); ++queryIter)
 			{
-				pElem = pRootElem->add_child_element("storedquery");
+				pElem = pRootElem->add_child("storedquery");
 				if (pElem == NULL)
 				{
 					return false;
@@ -1594,7 +1602,7 @@
 			// Labels
 			for (set<string>::iterator labelIter = m_labels.begin(); labelIter != m_labels.end(); ++labelIter)
 			{
-				pElem = pRootElem->add_child_element("label");
+				pElem = pRootElem->add_child("label");
 				if (pElem == NULL)
 				{
 					return false;
@@ -1606,7 +1614,7 @@
 			// Enable terms suggestion
 			addChildElement(pRootElem, "suggestterms", (m_suggestQueryTerms ? "YES" : "NO"));
 			// New results colour
-			pElem = pRootElem->add_child_element("newresults");
+			pElem = pRootElem->add_child("newresults");
 			if (pElem == NULL)
 			{
 				return false;
@@ -1618,7 +1626,7 @@
 			snprintf(numStr, 64, "%u", m_newResultsColourBlue);
 			addChildElement(pElem, "blue", numStr);
 			// Proxy
-			pElem = pRootElem->add_child_element("proxy");
+			pElem = pRootElem->add_child("proxy");
 			if (pElem == NULL)
 			{
 				return false;
@@ -1632,7 +1640,7 @@
 			for (set<IndexableLocation>::iterator locationIter = m_indexableLocations.begin();
 				locationIter != m_indexableLocations.end(); ++locationIter)
 			{
-				pElem = pRootElem->add_child_element("indexable");
+				pElem = pRootElem->add_child("indexable");
 				if (pElem == NULL)
 				{
 					return false;
@@ -1641,7 +1649,7 @@
 				addChildElement(pElem, "monitor", (locationIter->m_monitor ? "YES" : "NO"));
 			}
 			// File patterns
-			pElem = pRootElem->add_child_element("patterns");
+			pElem = pRootElem->add_child("patterns");
 			if (pElem == NULL)
 			{
 				return false;
@@ -1661,7 +1669,7 @@
 					continue;
 				}
 
-				pElem = pRootElem->add_child_element("pluginparameters");
+				pElem = pRootElem->add_child("pluginparameters");
 				if (pElem == NULL)
 				{
 					return false;
--- a/IndexSearch/OpenSearchParser.cpp
+++ b/IndexSearch/OpenSearchParser.cpp
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2005-2024 Fabrice Colin
+ *  Copyright 2005-2009 Fabrice Colin
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -44,11 +44,15 @@
 	const Element *pElem = dynamic_cast<const Element*>(pNode);
 	if (pElem != NULL)
 	{
-		const TextNode *pText = pElem->get_first_child_text();
+#ifdef HAS_LIBXMLPP026
+		const TextNode *pText = pElem->get_child_content();
+#else
+		const TextNode *pText = pElem->get_child_text();
+#endif
 		if (pText == NULL)
 		{
 			// Maybe the text is given as CDATA
-			Node::const_NodeList childNodes = pNode->get_children();
+			const Node::NodeList childNodes = pNode->get_children();
 			if (childNodes.size() == 1)
 			{
 				// Is it CDATA ?
@@ -136,7 +140,7 @@
 		{
 			if (rootNodeName == "rss")
 			{
-				Node::NodeList rssChildNodes = pRootElem->get_children();
+				const Node::NodeList rssChildNodes = pRootElem->get_children();
 				for (Node::NodeList::const_iterator rssIter = rssChildNodes.begin();
 					rssIter != rssChildNodes.end(); ++rssIter)
 				{
@@ -183,7 +187,7 @@
 		}
 
 		// Go through the subnodes
-		Node::NodeList childNodes = pRootElem->get_children();
+		const Node::NodeList childNodes = pRootElem->get_children();
 		for (Node::NodeList::const_iterator iter = childNodes.begin();
 			iter != childNodes.end(); ++iter)
 		{
@@ -223,7 +227,7 @@
 
 			// Go through the item's subnodes
 			ustring title, url, extract;
-			Node::NodeList itemChildNodes = pChildNode->get_children();
+			const Node::NodeList itemChildNodes = pChildNode->get_children();
 			for (Node::NodeList::const_iterator itemIter = itemChildNodes.begin();
 				itemIter != itemChildNodes.end(); ++itemIter)
 			{
@@ -349,7 +353,7 @@
 		}
 
 		// Go through the subnodes
-		Node::NodeList childNodes = pRootElem->get_children();
+		const Node::NodeList childNodes = pRootElem->get_children();
 		if (childNodes.empty() == false)
 		{
 			for (Node::NodeList::const_iterator iter = childNodes.begin(); iter != childNodes.end(); ++iter)
--- a/IndexSearch/ResultsExporter.cpp
+++ b/IndexSearch/ResultsExporter.cpp
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2007-2024 Fabrice Colin
+ *  Copyright 2007 Fabrice Colin
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -39,10 +39,14 @@
 		return NULL;
 	}
 
-	Element *pSubElem = pElem->add_child_element(nodeName);
+	Element *pSubElem = pElem->add_child(nodeName);
 	if (pSubElem != NULL)
 	{
-		pSubElem->set_first_child_text(nodeContent);
+#ifdef HAS_LIBXMLPP026
+		pSubElem->set_child_content(nodeContent);
+#else
+		pSubElem->set_child_text(nodeContent);
+#endif
 	}
 
 	return pSubElem;
@@ -201,7 +205,7 @@
 	pRootElem->set_attribute("xmlns:atom", "http://www.w3.org/2005/Atom");
 
 	// User interface position and size
-	m_pChannelElem = pRootElem->add_child_element("channel");
+	m_pChannelElem = pRootElem->add_child("channel");
 	if (m_pChannelElem == NULL)
 	{
 		return false;
@@ -246,7 +250,7 @@
 		return false;
 	}
 
-	Element *pElem = m_pChannelElem->add_child_element("item");
+	Element *pElem = m_pChannelElem->add_child("item");
 	addChildElement(pElem, "title", docInfo.getTitle());
 	addChildElement(pElem, "link", docInfo.getLocation());
 	addChildElement(pElem, "description", FilterUtils::stripMarkup(docInfo.getExtract()));
--- a/README
+++ b/README
@@ -512,8 +512,8 @@
 gtkmm							3.24
 http://www.gtkmm.org/
 
-libxml++						3.2.0
-https://github.com/libxmlplusplus/libxmlplusplus/
+libxml++						2.12.0
+http://libxmlplusplus.sourceforge.net/
 
 libexttextcat						3.2
 http://cgit.freedesktop.org/libreoffice/libexttextcat/
--- a/configure.ac
+++ b/configure.ac
@@ -372,7 +372,7 @@
     [],[PKG_CHECK_MODULES(GMIME, gmime-2.6 >= 2.5 )] )
 AC_SUBST(GMIME_CFLAGS)
 AC_SUBST(GMIME_LIBS)
-PKG_CHECK_MODULES(XML, libxml++-3.0 >= 3.2 )
+PKG_CHECK_MODULES(XML, libxml++-2.6 >= 2.12 )
 AC_SUBST(XML_CFLAGS)
 AC_SUBST(XML_LIBS)
 INDEX_CFLAGS="$XAPIAN_CFLAGS"
--- a/pinot.spec.in
+++ b/pinot.spec.in
@@ -17,11 +17,11 @@
 URL: https://github.com/FabriceColin/pinot
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: xapian-core-libs >= 1.4.10, libexttextcat, sqlite >= 3.3.1, libcurl >= 7.13, gmime >= 2.6
-Requires: libxml++30 >= 3.2, shared-mime-info, gtkmm30 >= 3.24
+Requires: libxml++ >= 2.12, shared-mime-info, gtkmm30 >= 3.24
 Requires: taglib >= 1.4, exiv2-libs >= 0.18, unzip, antiword, unrtf, %{pftotext_pkg}
 #Suggests: xapian-omega
 BuildRequires: xapian-core-devel >= 1.4.10, libuuid-devel, libexttextcat-devel, sqlite-devel >= 3.3.1, libcurl-devel >= 7.13, gmime-devel >= 2.6, boost-devel >= 1.75
-BuildRequires: libxml++30-devel >= 3.2, gtkmm30-devel >= 3.24, openssl-devel, gettext-devel, desktop-file-utils, help2man
+BuildRequires: libxml++-devel >= 2.12, gtkmm30-devel >= 3.24, openssl-devel, gettext-devel, desktop-file-utils, help2man
 BuildRequires: taglib-devel >= 1.4, exiv2-devel >= 0.18
 BuildRequires: gcc-c++
 %if 0%{?_with_libarchive:1}