[packages/mysql-connector-c++] - fix consructs that were deprecated in c++11 and dropped in c++17 - rel 4

baggins baggins at pld-linux.org
Sat Sep 16 16:44:58 CEST 2023


commit 8633a6cfafb080479be2d0e475e95cfc6a74ad1a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Sep 16 16:06:12 2023 +0200

    - fix consructs that were deprecated in c++11 and dropped in c++17
    - rel 4

 cxx17.patch              | 21 +++++++++++++++++++++
 mysql-connector-c++.spec |  6 +++++-
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/mysql-connector-c++.spec b/mysql-connector-c++.spec
index 7181132..b2fd756 100644
--- a/mysql-connector-c++.spec
+++ b/mysql-connector-c++.spec
@@ -6,7 +6,7 @@
 Summary:	MySQL database connector for C++
 Name:		mysql-connector-c++
 Version:	1.1.9
-Release:	3
+Release:	4
 License:	GPL v2 with exceptions
 Group:		Libraries
 URL:		http://forge.mysql.com/wiki/Connector_C++
@@ -14,6 +14,7 @@ Source0:	http://vesta.informatik.rwth-aachen.de/mysql/Downloads/Connector-C++/%{
 # Source0-md5:	f262bef7e70178f95ceb72a71f0915f7
 Source1:	get-source.sh
 # Source0Download: http://dev.mysql.com/downloads/connector/cpp
+Patch0:		cxx17.patch
 BuildRequires:	/usr/bin/mysql_config
 BuildRequires:	boost-devel >= 1.34.0
 BuildRequires:	cmake >= 2.6.2
@@ -62,6 +63,8 @@ Statyczna biblioteka mysqlcppconn.
 
 %prep
 %setup -q
+%patch0 -p1
+
 %{__sed} -i -e 's/lib$/%{_lib}/' driver/CMakeLists.txt
 %{__chmod} -x examples/*.cpp examples/*.txt
 
@@ -74,6 +77,7 @@ Statyczna biblioteka mysqlcppconn.
 %{__cp} -pr examples _doc_examples
 
 %build
+
 # MYSQLCLIENT_STATIC_BINDING controls whether libmysqlclient is linked or dlopened
 %cmake \
 	-DMYSQLCPPCONN_BUILD_EXAMPLES:BOOL=0 \
diff --git a/cxx17.patch b/cxx17.patch
new file mode 100644
index 0000000..40e7da9
--- /dev/null
+++ b/cxx17.patch
@@ -0,0 +1,21 @@
+--- mysql-connector-c++-1.1.9/cppconn/exception.h~	2017-05-10 18:14:59.000000000 +0200
++++ mysql-connector-c++-1.1.9/cppconn/exception.h	2023-09-16 15:58:31.151095899 +0200
+@@ -36,12 +36,12 @@
+ {
+ 
+ #define MEMORY_ALLOC_OPERATORS(Class) \
+-	void* operator new(size_t size) throw (std::bad_alloc) { return ::operator new(size); }  \
+-	void* operator new(size_t, void*) throw(); \
+-	void* operator new(size_t, const std::nothrow_t&) throw(); \
+-	void* operator new[](size_t) throw (std::bad_alloc); \
+-	void* operator new[](size_t, void*) throw(); \
+-	void* operator new[](size_t, const std::nothrow_t&) throw(); \
++	void* operator new(size_t size) noexcept(false) { return ::operator new(size); }  \
++	void* operator new(size_t, void*) noexcept; \
++	void* operator new(size_t, const std::nothrow_t&) noexcept; \
++	void* operator new[](size_t) noexcept(false); \
++	void* operator new[](size_t, void*) noexcept; \
++	void* operator new[](size_t, const std::nothrow_t&) noexcept; \
+ 	void* operator new(size_t N, std::allocator<Class>&);
+ 
+ #ifdef _WIN32
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql-connector-c++.git/commitdiff/8633a6cfafb080479be2d0e475e95cfc6a74ad1a



More information about the pld-cvs-commit mailing list