[packages/mysql-workbench] - fix sign-compare errors

baggins baggins at pld-linux.org
Fri Dec 27 22:45:49 CET 2024


commit 4d661a34d9a865e7d5cda0f56993bd363334bd75
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 27 23:43:48 2024 +0100

    - fix sign-compare errors

 mysql-workbench.spec         | 20 +++++++++++---------
 std-distance-is-signed.patch | 19 +++++++++++++++++++
 2 files changed, 30 insertions(+), 9 deletions(-)
---
diff --git a/mysql-workbench.spec b/mysql-workbench.spec
index cbd957a..5609bfc 100644
--- a/mysql-workbench.spec
+++ b/mysql-workbench.spec
@@ -31,6 +31,7 @@ Patch3:		antlr-res.patch
 Patch4:		mysql-version.patch
 Patch5:		ldconfig.patch
 Patch6:		types.patch
+Patch7:		std-distance-is-signed.patch
 Patch8:		format-string.patch
 URL:		http://wb.mysql.com/
 BuildRequires:	OpenGL-devel
@@ -46,6 +47,7 @@ BuildRequires:	gdal-devel
 BuildRequires:	glib2-devel
 BuildRequires:	gtkmm3-devel
 %buildrequires_jdk
+BuildRequires:	/usr/bin/mysql_config
 BuildRequires:	libgnome-keyring-devel
 %{?with_gnome_keyring:BuildRequires:	libgnome-keyring-devel}
 BuildRequires:	libsecret-devel
@@ -57,7 +59,6 @@ BuildRequires:	libxml2-devel
 BuildRequires:	libzip-devel
 BuildRequires:	lua51-devel
 BuildRequires:	mysql-connector-c++-devel >= 1.1.8
-BuildRequires:	/usr/bin/mysql_config
 BuildRequires:	pcre-cxx-devel
 BuildRequires:	pcre-devel
 BuildRequires:	pkgconfig
@@ -106,14 +107,15 @@ skomplikowanych migracji do MySQL-a.
 
 %prep
 %setup -q -n %{name}-community-%{version}-src
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch8 -p1
+%patch -P 0 -p1
+%patch -P 1 -p1
+%patch -P 2 -p1
+%patch -P 3 -p1
+%patch -P 4 -p1
+%patch -P 5 -p1
+%patch -P 6 -p1
+%patch -P 7 -p1
+%patch -P 8 -p1
 cp -p '%{SOURCE2}' res/mysql.profiles
 
 install -d linux-res/bin
diff --git a/std-distance-is-signed.patch b/std-distance-is-signed.patch
new file mode 100644
index 0000000..0e2da6f
--- /dev/null
+++ b/std-distance-is-signed.patch
@@ -0,0 +1,19 @@
+--- mysql-workbench-community-8.0.40-src/library/grt/src/grtpp_shell.cpp.orig	2024-10-30 17:25:48.000000000 +0100
++++ mysql-workbench-community-8.0.40-src/library/grt/src/grtpp_shell.cpp	2024-12-27 23:34:39.473331983 +0100
+@@ -30,14 +30,14 @@
+ 
+ #define O_VECTOR_COUNT 64 // max # of ()*2+2
+ 
+-std::string get_value_from_text_ex(const std::string& txt, const std::string& regexpr, unsigned int substringNr) {
++std::string get_value_from_text_ex(const std::string& txt, const std::string& regexpr, int substringNr) {
+   std::regex regex(regexpr, std::regex::icase);
+   auto begin = std::sregex_iterator(txt.begin(), txt.end(), regex);
+   auto end = std::sregex_iterator();
+   if(std::distance(begin, end) >= substringNr)
+     return "";
+ 
+-  unsigned int idx = 0; 
++  int idx = 0;
+   for (std::sregex_iterator i = begin; i != end; ++i, ++idx) {
+     if (idx == substringNr) {
+       std::smatch match = *i;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql-workbench.git/commitdiff/4d661a34d9a865e7d5cda0f56993bd363334bd75



More information about the pld-cvs-commit mailing list