Control: tags -1 patch

Dear Maintainer,

Please find in attachment a debdiff that make src:gobby
build against libxml++-5.0 instead of libxml++2.6

Best regards,
Sébastien
--- a/debian/control	2024-07-27 14:32:01.000000000 +0200
+++ b/debian/control	2026-02-17 17:27:47.932678189 +0100
@@ -2,7 +2,7 @@
 Section: net
 Priority: optional
 Maintainer: Philipp Kern <[email protected]>
-Build-Depends: debhelper (>> 12~), dpkg-dev (>= 1.16.1), libxml++2.6-dev, libglibmm-2.4-dev (>> 2.40.0), libgtkmm-3.0-dev, libinfinity-0.7-dev, libgtksourceview-4-dev, libgsasl-dev, gettext, intltool, yelp-tools
+Build-Depends: debhelper (>> 12~), dpkg-dev (>= 1.16.1), libxml++-5.0-dev, libglibmm-2.4-dev (>> 2.40.0), libgtkmm-3.0-dev, libinfinity-0.7-dev, libgtksourceview-4-dev, libgsasl-dev, gettext, intltool, yelp-tools
 Standards-Version: 4.5.0
 Homepage: https://gobby.github.io
 Rules-Requires-Root: no
--- a/debian/patches/libxml++5.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/debian/patches/libxml++5.patch	2026-02-17 18:14:18.309060062 +0100
@@ -0,0 +1,231 @@
+Description: Upgrade dependency from libxml++2.6-dev to libxml++-5.0-dev
+Bug-Debian: http://bugs.debian.org/1121316
+Author: Sébastien Noel <[email protected]>
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,7 +44,7 @@ case "$host_os" in
+ esac
+ AM_CONDITIONAL(WIN32, test x$win32 = xtrue)
+ 
+-required_libs="libxml++-2.6 glibmm-2.4 >= 2.39.93 giomm-2.4 >= 2.39.93 libgsasl >= 0.2.21 gnutls >= 3.0.20 gtkmm-3.0 >= 3.6.0 gtksourceview-4"
++required_libs="libxml++-5.0 glibmm-2.4 >= 2.39.93 giomm-2.4 >= 2.39.93 libgsasl >= 0.2.21 gnutls >= 3.0.20 gtkmm-3.0 >= 3.6.0 gtksourceview-4"
+ 
+ ###################################
+ # Check for libraries.
+--- a/code/core/documentinfostorage.cpp
++++ b/code/core/documentinfostorage.cpp
+@@ -65,7 +65,7 @@ namespace
+ 				dynamic_cast<xmlpp::Element*>(*iter);
+ 			if(child == NULL) continue;
+ 
+-			xmlpp::TextNode* text = child->get_child_text();
++			xmlpp::TextNode* text = child->get_first_child_text();
+ 			if(text == NULL) continue;
+ 
+ 			if(child->get_name() == "root")
+@@ -162,22 +162,22 @@ Gobby::DocumentInfoStorage::~DocumentInf
+ 		for(InfoMap::iterator iter = m_infos.begin();
+ 		    iter != m_infos.end(); ++ iter)
+ 		{
+-			xmlpp::Element* child = root->add_child("document");
++			xmlpp::Element* child = root->add_child_element("document");
+ 
+-			xmlpp::Element* root_child = child->add_child("root");
+-			root_child->set_child_text(iter->first);
++			xmlpp::Element* root_child = child->add_child_element("root");
++			root_child->set_first_child_text(iter->first);
+ 
+-			xmlpp::Element* uri_child = child->add_child("uri");
+-			uri_child->set_child_text(iter->second.uri);
++			xmlpp::Element* uri_child = child->add_child_element("uri");
++			uri_child->set_first_child_text(iter->second.uri);
+ 
+ 			xmlpp::Element* eol_style_child =
+-				child->add_child("eol-style");
+-			eol_style_child->set_child_text(
++				child->add_child_element("eol-style");
++			eol_style_child->set_first_child_text(
+ 				eol_style_to_text(iter->second.eol_style));
+ 
+ 			xmlpp::Element* encoding_child =
+-				child->add_child("encoding");
+-			encoding_child->set_child_text(iter->second.encoding);
++				child->add_child_element("encoding");
++			encoding_child->set_first_child_text(iter->second.encoding);
+ 		}
+ 
+ 		document.write_to_file_formatted(filename());
+--- a/code/core/knownhoststorage.cpp
++++ b/code/core/knownhoststorage.cpp
+@@ -52,7 +52,7 @@ namespace
+ 				dynamic_cast<xmlpp::Element*>(*iter);
+ 			if(child == NULL) continue;
+ 
+-			xmlpp::TextNode* text = child->get_child_text();
++			xmlpp::TextNode* text = child->get_first_child_text();
+ 			if(text == NULL) continue;
+ 
+ 			if(child->get_name() == "name")
+@@ -228,18 +228,18 @@ Gobby::KnownHostStorage::~KnownHostStora
+ 				INF_GTK_BROWSER_MODEL_COL_NAME, &name,
+ 				-1);
+ 
+-			xmlpp::Element* child = root->add_child("host");
++			xmlpp::Element* child = root->add_child_element("host");
+ 			xmlpp::Element* name_elem =
+-				child->add_child("name");
+-			name_elem->set_child_text(name);
++				child->add_child_element("name");
++			name_elem->set_first_child_text(name);
+ 			
+ 			xmlpp::Element* hostname_elem =
+-				child->add_child("hostname");
+-			hostname_elem->set_child_text(hostname);
++				child->add_child_element("hostname");
++			hostname_elem->set_first_child_text(hostname);
+ 
+ 			xmlpp::Element* service_elem =
+-				child->add_child("service");
+-			service_elem->set_child_text(service);
++				child->add_child_element("service");
++			service_elem->set_first_child_text(service);
+ 
+ 			g_object_unref(resolver);
+ 		}
+--- a/code/operations/operation-export-html.cpp
++++ b/code/operations/operation-export-html.cpp
+@@ -122,7 +122,7 @@ namespace
+ 		tags.clear();
+ 		line_counter = 1;
+ 		xmlpp::Element* last_node = content;
+-		xmlpp::Element* line_no = last_node->add_child("span");
++		xmlpp::Element* line_no = last_node->add_child_element("span");
+ 		line_no->set_attribute("class", "line_no");
+ 		line_no->set_attribute("id", "line_1");
+ 
+@@ -153,7 +153,7 @@ namespace
+ 			Glib::ustring classes = get_current_tags(tags, &begin);
+ 			if(!classes.empty())
+ 			{
+-				last_node = last_node->add_child("span");
++				last_node = last_node->add_child_element("span");
+ 				last_node->set_attribute("class", classes);
+ 
+ 				// add mouseover "written by" popup
+@@ -199,7 +199,7 @@ namespace
+ 						              next_pos));
+ 					last_pos = next_pos;
+ 
+-					line_no = last_node->add_child("span");
++					line_no = last_node->add_child_element("span");
+ 					line_no->set_attribute("class",
+ 					                       "line_no");
+ 					line_no->set_attribute(
+@@ -263,7 +263,7 @@ namespace
+ 			uprintf(Glib::ustring(translated, p).c_str(),
+ 			        hostname, path, time_str));
+ 
+-		xmlpp::Element* link = node->add_child("a");
++		xmlpp::Element* link = node->add_child_element("a");
+ 		link->set_attribute("href", "http://gobby.github.io/";);
+ 		link->add_child_text(PACKAGE_STRING);
+ 
+@@ -294,7 +294,7 @@ namespace
+ 			const char* name = inf_user_get_name(INF_USER(*i));
+ 			const unsigned int rgb = rgba_to_rgb24(rgba.gobj());
+ 
+-			xmlpp::Element* item = list->add_child("li");
++			xmlpp::Element* item = list->add_child_element("li");
+ 			item->add_child_text(name);
+ 			item->set_attribute(
+ 				"style",
+@@ -377,16 +377,16 @@ namespace
+ 			* root      = output.create_root_node(
+ 					"html",
+ 					"http://www.w3.org/1999/xhtml";),
+-			* head      = root->add_child("head"),
+-			* body      = root->add_child("body"),
+-			* title     = head->add_child("title"),
+-			* style     = head->add_child("style"),
+-			* h1        = body->add_child("h1"),
+-			* h2        = body->add_child("h2"),
+-			* user_list = body->add_child("ul"),
+-			* content   = body->add_child("pre"),
+-			* info      = body->add_child("p"),
+-			* icon      = h1->add_child("img");
++			* head      = root->add_child_element("head"),
++			* body      = root->add_child_element("body"),
++			* title     = head->add_child_element("title"),
++			* style     = head->add_child_element("style"),
++			* h1        = body->add_child_element("h1"),
++			* h2        = body->add_child_element("h2"),
++			* user_list = body->add_child_element("ul"),
++			* content   = body->add_child_element("pre"),
++			* info      = body->add_child_element("p"),
++			* icon      = h1->add_child_element("img");
+ 
+ 		icon->set_attribute("src",    gobby_icon);
+ 		icon->set_attribute("width",  "48");
+@@ -416,8 +416,8 @@ namespace
+ 		dump_tags_style(style, tags);
+ 		if(!user_list->cobj()->children)
+ 		{
+-			body->remove_child(h2);
+-			body->remove_child(user_list);
++			xmlpp::Node::remove_node(h2);
++			xmlpp::Node::remove_node(user_list);
+ 		}
+ 
+ 		style->add_child_text(
+--- a/code/util/config.cpp
++++ b/code/util/config.cpp
+@@ -56,16 +56,16 @@ Gobby::Config::ParentEntry::ParentEntry(
+ Gobby::Config::ParentEntry::ParentEntry(const xmlpp::Element& elem):
+ 	Entry(elem.get_name() )
+ {
+-	xmlpp::Node::NodeList list = elem.get_children();
+-	for(xmlpp::Node::NodeList::iterator iter = list.begin();
++	xmlpp::Node::const_NodeList list = elem.get_children();
++	for(xmlpp::Node::const_NodeList::iterator iter = list.begin();
+ 	    iter != list.end();
+ 	    ++ iter)
+ 	{
+-		xmlpp::Element* child = dynamic_cast<xmlpp::Element*>(*iter);
++		const xmlpp::Element* child = dynamic_cast<const xmlpp::Element*>(*iter);
+ 		if(child == NULL) continue;
+ 
+-		if(child->get_child_text() &&
+-		   !child->get_child_text()->is_white_space())
++		if(child->get_first_child_text() &&
++		   !child->get_first_child_text()->is_white_space())
+ 		{
+ 			ValueEntry* entry = new TypedValueEntry<Glib::ustring>(
+ 				*child
+@@ -97,7 +97,7 @@ void Gobby::Config::ParentEntry::save(xm
+ 	    ++ iter)
+ 	{
+ 		Entry* entry = iter->second;
+-		xmlpp::Element* child = elem.add_child(entry->get_name() );
++		xmlpp::Element* child = elem.add_child_element(entry->get_name() );
+ 		entry->save(*child);
+ 	}
+ }
+--- a/code/util/config.hpp
++++ b/code/util/config.hpp
+@@ -349,14 +349,14 @@ Config::TypedValueEntry<DataType>::
+ 
+ template<typename DataType>
+ Config::TypedValueEntry<DataType>::TypedValueEntry(const xmlpp::Element& elem):
+-	ValueEntry(elem.get_name(), elem.get_child_text()->get_content() )
++	ValueEntry(elem.get_name(), elem.get_first_child_text()->get_content() )
+ {
+ }
+ 
+ template<typename DataType>
+ void Config::TypedValueEntry<DataType>::save(xmlpp::Element& elem) const
+ {
+-	elem.set_child_text(m_data.serialized() );
++	elem.set_first_child_text(m_data.serialized() );
+ }
+ 
+ template<typename BaseIterator, typename Entry>
--- a/debian/patches/series	2024-07-27 14:33:38.000000000 +0200
+++ b/debian/patches/series	2026-02-17 17:28:39.749906330 +0100
@@ -1,2 +1,3 @@
 build-against-gtksourceview-4.patch
 gtksourcedrawspacesflags-declaration.patch
+libxml++5.patch

Reply via email to