public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Denis Arnaud <denis.arnaud_fedora@m4x.org>
To: git-commits@fedoraproject.org
Subject: [rpms/soci] update-to-4.1.4: Fixed FTBS on Rawhide due to C++11 compatibility
Date: Sat, 20 Jun 2026 04:39:35 GMT	[thread overview]
Message-ID: <178193037530.1.17766821901178064705.rpms-soci-7258f8e3f2cb@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/soci
Branch : update-to-4.1.4
Commit : 7258f8e3f2cb24e9fa1aa5fc657f6b87a27e36e7
Author : Denis Arnaud <denis.arnaud_fedora@m4x.org>
Date   : 2017-01-14T01:22:53+01:00
Stats  : +86/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/soci/c/7258f8e3f2cb24e9fa1aa5fc657f6b87a27e36e7?branch=update-to-4.1.4

Log:
Fixed FTBS on Rawhide due to C++11 compatibility

---
diff --git a/soci-001-fix-auto_ptr-c++11.patch b/soci-001-fix-auto_ptr-c++11.patch
new file mode 100644
index 0000000..d3fb38e
--- /dev/null
+++ b/soci-001-fix-auto_ptr-c++11.patch
@@ -0,0 +1,80 @@
+diff -Naur soci-3.2.3.org/CMakeLists.txt soci-3.2.3/CMakeLists.txt
+--- soci-3.2.3.org/CMakeLists.txt	2015-04-09 00:39:00.000000000 +0200
++++ soci-3.2.3/CMakeLists.txt	2017-01-14 01:02:20.417016971 +0100
+@@ -39,6 +39,10 @@
+ include(SociSystemInfo)
+ include(SociConfig)
+ 
++if(CMAKE_COMPILER_IS_GNUCXX)
++  add_definitions(-std=gnu++0x)
++endif()
++
+ boost_report_value(SOCI_PLATFORM_NAME)
+ boost_report_value(SOCI_COMPILER_NAME)
+ 
+diff -Naur soci-3.2.3.org/core/rowset.h soci-3.2.3/core/rowset.h
+--- soci-3.2.3.org/core/rowset.h	2015-04-08 22:32:00.000000000 +0200
++++ soci-3.2.3/core/rowset.h	2017-01-14 01:02:20.418016969 +0100
+@@ -154,8 +154,8 @@
+ 
+     unsigned int refs_;
+ 
+-    const std::auto_ptr<statement> st_;
+-    const std::auto_ptr<T> define_;
++    const std::unique_ptr<statement> st_;
++    const std::unique_ptr<T> define_;
+ 
+     // Non-copyable
+     rowset_impl(rowset_impl const &);
+diff -Naur soci-3.2.3.org/core/session.cpp soci-3.2.3/core/session.cpp
+--- soci-3.2.3.org/core/session.cpp	2015-04-08 22:28:14.000000000 +0200
++++ soci-3.2.3/core/session.cpp	2017-01-14 01:02:20.419016966 +0100
+@@ -235,11 +235,11 @@
+ }
+ 
+ void session::set_query_transformation_(
+-        std::auto_ptr<details::query_transformation_function> qtf)
++        std::unique_ptr<details::query_transformation_function> qtf)
+ {
+     if (isFromPool_)
+     {
+-        pool_->at(poolPosition_).set_query_transformation_(qtf);
++        pool_->at(poolPosition_).set_query_transformation_(std::move(qtf));
+     }
+     else
+     {
+diff -Naur soci-3.2.3.org/core/session.h soci-3.2.3/core/session.h
+--- soci-3.2.3.org/core/session.h	2015-04-08 22:32:00.000000000 +0200
++++ soci-3.2.3/core/session.h	2017-01-14 01:05:19.044639113 +0100
+@@ -40,7 +40,7 @@
+ {
+ private:
+ 
+-    void set_query_transformation_(std::auto_ptr<details::query_transformation_function> qtf);
++    void set_query_transformation_(std::unique_ptr<details::query_transformation_function> qtf);
+ 
+ public:
+     session();
+@@ -77,8 +77,8 @@
+     template <typename T>
+     void set_query_transformation(T callback)
+     {
+-        std::auto_ptr<details::query_transformation_function> qtf(new details::query_transformation<T>(callback));
+-        set_query_transformation_(qtf);
++        std::unique_ptr<details::query_transformation_function> qtf(new details::query_transformation<T>(callback));
++        set_query_transformation_(std::move(qtf));
+ 
+         assert(qtf.get() == NULL);
+     }
+diff -Naur soci-3.2.3.org/core/test/common-tests.h soci-3.2.3/core/test/common-tests.h
+--- soci-3.2.3.org/core/test/common-tests.h	2015-04-09 00:39:01.000000000 +0200
++++ soci-3.2.3/core/test/common-tests.h	2017-01-14 01:02:20.421016962 +0100
+@@ -350,7 +350,7 @@
+     backend_factory const &backEndFactory_;
+     std::string const connectString_;
+ 
+-typedef std::auto_ptr<table_creator_base> auto_table_creator;
++typedef std::unique_ptr<table_creator_base> auto_table_creator;
+ 
+ void test0()
+ {

diff --git a/soci.spec b/soci.spec
index 1a2ae70..9b00093 100644
--- a/soci.spec
+++ b/soci.spec
@@ -22,7 +22,7 @@
 #
 Name:           soci
 Version:        3.2.3
-Release:        8%{?dist}
+Release:        9%{?dist}
 
 Summary:        The database access library for C++ programmers
 
@@ -30,6 +30,7 @@ Group:          System Environment/Libraries
 License:        Boost
 URL:            http://%{name}.sourceforge.net
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0:         soci-001-fix-auto_ptr-c++11.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:  cmake
@@ -193,6 +194,7 @@ library. The documentation is the same as at the %{name} web page.
 
 %prep
 %setup -q
+%patch0 -p1
 
 # Rename change-log and license file, so that they comply with
 # packaging standard
@@ -350,6 +352,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jan 13 2017 Denis Arnaud Denis Arnaud <denis.arnaud_fedora@m4x.org> - 3.2.3-9
+- Fixed compilation issues with C++11 (deprecation of auto_ptr)
+
 * Mon May 16 2016 Jonathan Wakely <jwakely@redhat.com> - 3.2.3-8
 - Rebuilt for linker errors in boost (#1331983)
 

                 reply	other threads:[~2026-06-20  4:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178193037530.1.17766821901178064705.rpms-soci-7258f8e3f2cb@fedoraproject.org \
    --to=denis.arnaud_fedora@m4x.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox