summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-01-29 11:45:45 +0200
committerHans de Graaff <graaff@gentoo.org>2024-01-29 14:02:15 +0100
commitd6c21bdac617b6b07cbeb7e8b17fa91ae90f0b55 (patch)
tree62e1d135f7c60ae08263642557852731738bc126 /dev-db/mysql-workbench
parentdev-util/cucumber-messages: add 24.0.1 (diff)
downloadgentoo-d6c21bdac617b6b07cbeb7e8b17fa91ae90f0b55.tar.gz
gentoo-d6c21bdac617b6b07cbeb7e8b17fa91ae90f0b55.tar.bz2
gentoo-d6c21bdac617b6b07cbeb7e8b17fa91ae90f0b55.zip
dev-db/mysql-workbench: fix build with >=libxml2-2.12
Closes: https://bugs.gentoo.org/923020 Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-db/mysql-workbench')
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-8.0.36-libxml2-2.12-support.patch33
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-8.0.36.ebuild1
2 files changed, 34 insertions, 0 deletions
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-8.0.36-libxml2-2.12-support.patch b/dev-db/mysql-workbench/files/mysql-workbench-8.0.36-libxml2-2.12-support.patch
new file mode 100644
index 000000000000..e3ee9aa099f0
--- /dev/null
+++ b/dev-db/mysql-workbench/files/mysql-workbench-8.0.36-libxml2-2.12-support.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/923020
+https://github.com/mysql/mysql-workbench/pull/43
+
+From 8f8917671ab5a06f842a340f31c6d4ec7634147a Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Sat, 27 Jan 2024 22:51:15 +0200
+Subject: [PATCH] Fix support for libxml2-2.12 with its api and header changes
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+--- a/library/grt/src/grt.h
++++ b/library/grt/src/grt.h
+@@ -34,6 +34,7 @@
+ #include <vector>
+ #include <stdexcept>
+ #include <boost/function.hpp>
++#include <libxml/tree.h>
+ #include <libxml/xmlmemory.h>
+ #include "base/threading.h"
+ #include <string>
+--- a/library/grt/src/unserializer.cpp
++++ b/library/grt/src/unserializer.cpp
+@@ -401,7 +401,11 @@ ValueRef internal::Unserializer::unserialize_xmldata(const char *data, size_t si
+ xmlDocPtr doc = xmlReadMemory(data, (int)size, NULL, NULL, XML_PARSE_NOENT);
+
+ if (!doc) {
++#if LIBXML_VERSION >= 21200
++ const xmlError* error = xmlGetLastError();
++#else
+ xmlErrorPtr error = xmlGetLastError();
++#endif
+
+ if (error)
+ throw std::runtime_error(base::strfmt("Could not parse XML data. Line %d, %s", error->line, error->message));
diff --git a/dev-db/mysql-workbench/mysql-workbench-8.0.36.ebuild b/dev-db/mysql-workbench/mysql-workbench-8.0.36.ebuild
index c8e0352d19f7..2f2d812652f4 100644
--- a/dev-db/mysql-workbench/mysql-workbench-8.0.36.ebuild
+++ b/dev-db/mysql-workbench/mysql-workbench-8.0.36.ebuild
@@ -70,6 +70,7 @@ PATCHES=(
"${FILESDIR}/${PN}-6.2.5-wbcopytables.patch"
"${FILESDIR}/${PN}-8.0.19-mysql-connector-8.patch"
"${FILESDIR}/${PN}-8.0.33-gcc13.patch"
+ "${FILESDIR}/${PN}-8.0.36-libxml2-2.12-support.patch"
)
src_unpack() {