commit:     004cd3270f1eeaf8c9c331aa5d35c43e579c54bb
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  6 07:23:32 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Apr  6 07:24:42 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=004cd327

dev-tcltk/mysqltcl: fix c23 build

Closes: https://bugs.gentoo.org/946987
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-tcltk/mysqltcl/files/mysqltcl-3.05-API.patch  | 16 ++++++++--------
 dev-tcltk/mysqltcl/files/mysqltcl-3.052-c23.patch | 22 ++++++++++++++++++++++
 dev-tcltk/mysqltcl/mysqltcl-3.052-r2.ebuild       |  5 ++++-
 3 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/dev-tcltk/mysqltcl/files/mysqltcl-3.05-API.patch 
b/dev-tcltk/mysqltcl/files/mysqltcl-3.05-API.patch
index f28f044f850f..579057268889 100644
--- a/dev-tcltk/mysqltcl/files/mysqltcl-3.05-API.patch
+++ b/dev-tcltk/mysqltcl/files/mysqltcl-3.05-API.patch
@@ -1,11 +1,11 @@
 --- a/generic/mysqltcl.c       2022-12-24 18:24:12.451620838 +0100
 +++ b/generic/mysqltcl.c       2022-12-24 18:24:24.075438534 +0100
 @@ -911,7 +911,7 @@
- #if (MYSQL_VERSION_ID>=32350)
-   if(mysql_options_reconnect)
-   {
--      my_bool reconnect = 1;
-+      bool reconnect = 1;
-       mysql_options(handle->connection, MYSQL_OPT_RECONNECT, &reconnect);
-   }
-   mysql_options(handle->connection,MYSQL_READ_DEFAULT_GROUP,groupname);
+ #if (MYSQL_VERSION_ID>=32350)
+   if(mysql_options_reconnect)
+   {
+-      my_bool reconnect = 1;
++      bool reconnect = 1;
+       mysql_options(handle->connection, MYSQL_OPT_RECONNECT, &reconnect);
+   }
+   mysql_options(handle->connection,MYSQL_READ_DEFAULT_GROUP,groupname);

diff --git a/dev-tcltk/mysqltcl/files/mysqltcl-3.052-c23.patch 
b/dev-tcltk/mysqltcl/files/mysqltcl-3.052-c23.patch
new file mode 100644
index 000000000000..df66202afa25
--- /dev/null
+++ b/dev-tcltk/mysqltcl/files/mysqltcl-3.052-c23.patch
@@ -0,0 +1,22 @@
+--- a/generic/mysqltcl.c       2025-04-06 09:16:50.402168333 +0200
++++ b/generic/mysqltcl.c       2025-04-06 09:17:26.718696196 +0200
+@@ -2642,8 +2642,7 @@
+ #ifdef _WINDOWS
+ __declspec( dllexport )
+ #endif
+-int Mysqltcl_Init(interp)
+-    Tcl_Interp *interp;
++int Mysqltcl_Init(Tcl_Interp *interp)
+ {
+   char nbuf[MYSQL_SMALL_SIZE];
+   MysqltclState *statePtr;
+@@ -2763,8 +2762,7 @@
+ #ifdef _WINDOWS
+ __declspec( dllexport )
+ #endif
+-int Mysqltcl_SafeInit(interp)
+-    Tcl_Interp *interp;
++int Mysqltcl_SafeInit(Tcl_Interp *interp)
+ {
+   return Mysqltcl_Init(interp);
+ }

diff --git a/dev-tcltk/mysqltcl/mysqltcl-3.052-r2.ebuild 
b/dev-tcltk/mysqltcl/mysqltcl-3.052-r2.ebuild
index 8edd7cfe8c16..8f62aa1bee67 100644
--- a/dev-tcltk/mysqltcl/mysqltcl-3.052-r2.ebuild
+++ b/dev-tcltk/mysqltcl/mysqltcl-3.052-r2.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
+inherit edos2unix
 
 DESCRIPTION="TCL MySQL Interface"
 HOMEPAGE="http://www.xdobry.de/mysqltcl/";
@@ -23,10 +24,12 @@ QA_CONFIG_IMPL_DECL_SKIP=(
 PATCHES=(
        "${FILESDIR}"/${PN}-3.05-ldflags.patch
        "${FILESDIR}"/${PN}-3.05-API.patch
+       "${FILESDIR}"/${P}-c23.patch
 )
 HTML_DOCS=( doc/mysqltcl.html )
 
 src_prepare() {
+       edos2unix generic/mysqltcl.c
        default_src_prepare
        sed -i 's/-pipe//g;s/-O2//g;s/-fomit-frame-pointer//g' configure || die
 }

Reply via email to