[packages/libpmemobj-cpp] Up to 1.13.0

arekm arekm at pld-linux.org
Sun Mar 15 15:24:37 CET 2026


commit 25f517e0656142b0083440ae268c1872fd2401c0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Mar 15 15:24:16 2026 +0100

    Up to 1.13.0

 libpmemobj-cpp-get_allocator.patch | 35 +++++++++++++++++++++++++++++++++++
 libpmemobj-cpp-pc.patch            | 10 ----------
 libpmemobj-cpp.spec                | 18 +++++++++++-------
 3 files changed, 46 insertions(+), 17 deletions(-)
---
diff --git a/libpmemobj-cpp.spec b/libpmemobj-cpp.spec
index 0aebfae..fd8c58c 100644
--- a/libpmemobj-cpp.spec
+++ b/libpmemobj-cpp.spec
@@ -5,23 +5,24 @@
 Summary:	C++ bindings for PMDK libpmemobj library
 Summary(pl.UTF-8):	Wiązania C++ do biblioteki PMDK libpmemobj
 Name:		libpmemobj-cpp
-Version:	1.5
+Version:	1.13.0
 Release:	1
 License:	BSD
 Group:		Applications/System
 #Source0Download: https://github.com/pmem/libpmemobj-cpp/releases
 Source0:	https://github.com/pmem/libpmemobj-cpp/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	149690b32bfab0668413a532f709dbf2
-Patch0:		%{name}-pc.patch
+# Source0-md5:	2c1829e984de4a369fd2bbdadccc893d
+Patch0:		%{name}-get_allocator.patch
 URL:		http://pmem.io/pmdk/cpp_obj/
 BuildRequires:	cmake >= 3.3
 %{?with_apidocs:BuildRequires:	doxygen}
-BuildRequires:	pmdk-devel >= 1.4
-BuildRequires:	libstdc++-devel >= 6:4.8
+BuildRequires:	pmdk-devel >= 1.9
+BuildRequires:	libstdc++-devel >= 6:5
 BuildRequires:	perl-base >= 1:5.16
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.605
 ExclusiveArch:	%{x8664} aarch64
+%define		_enable_debug_packages	0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -34,8 +35,8 @@ Wiązania C++ do biblioteki PMDK libpmemobj.
 Summary:	C++ bindings for PMDK libpmemobj library
 Summary(pl.UTF-8):	Wiązania C++ do biblioteki PMDK libpmemobj
 Group:		Development/Libraries
-Requires:	pmdk-devel >= 1.4
-Requires:	libstdc++-devel >= 6:4.8
+Requires:	pmdk-devel >= 1.9
+Requires:	libstdc++-devel >= 6:5
 Obsoletes:	pmdk-c++-devel < 1.5
 
 %description devel
@@ -66,7 +67,10 @@ install -d build
 cd build
 # .pc file creation expects CMAKE_INSTALL_{INCLUDE,LIB}DIR relative to CMAKE_INSTALL_PREFIX
 %cmake .. \
+	-DBUILD_BENCHMARKS=OFF \
 	%{!?with_apidocs:-DBUILD_DOC=OFF} \
+	-DBUILD_EXAMPLES=OFF \
+	-DBUILD_TESTS=OFF \
 	-DCMAKE_INSTALL_DOCDIR=%{_docdir}/libpmemobj-cpp \
 	-DCMAKE_INSTALL_INCLUDEDIR=include \
 	-DCMAKE_INSTALL_LIBDIR=%{_lib}
diff --git a/libpmemobj-cpp-get_allocator.patch b/libpmemobj-cpp-get_allocator.patch
new file mode 100644
index 0000000..b74674f
--- /dev/null
+++ b/libpmemobj-cpp-get_allocator.patch
@@ -0,0 +1,35 @@
+Implement get_allocator() for concurrent_skip_list.
+
+Upstream removed get_allocator() in PR #825 due to issue #827 (type
+mismatch), leaving a XXX comment. However, the method is still called
+internally in the move constructor (line 713), causing a build failure
+with GCC's -Wtemplate-body.
+
+The fix constructs allocator_type from _node_allocator via allocator
+rebind construction, which is guaranteed by the C++ Allocator
+requirements (allocators are inter-convertible between rebind types).
+This is valid because _node_allocator is itself constructed from
+allocator_type (lines 556, 589, 648, 707).
+
+See: https://github.com/pmem/libpmemobj-cpp/issues/827
+
+--- libpmemobj-cpp-1.13.0/include/libpmemobj++/container/detail/concurrent_skip_list_impl.hpp.orig	2021-07-27 00:00:00.000000000 +0100
++++ libpmemobj-cpp-1.13.0/include/libpmemobj++/container/detail/concurrent_skip_list_impl.hpp	2021-07-27 00:00:00.000000000 +0100
+@@ -2114,9 +2114,15 @@
+ 	}
+
+ 	/**
+-	 * XXX: Implement get_allocator() interface.
+-	 * Related with: https://github.com/pmem/libpmemobj-cpp/issues/827
++	 * Returns the allocator associated with the container.
++	 *
++	 * @return allocator_type object used by this container.
+ 	 */
++	allocator_type
++	get_allocator() const
++	{
++		return allocator_type(_node_allocator);
++	}
+
+ 	/**
+ 	 * Exchanges the contents of the container with those of other
diff --git a/libpmemobj-cpp-pc.patch b/libpmemobj-cpp-pc.patch
deleted file mode 100644
index 5735f85..0000000
--- a/libpmemobj-cpp-pc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libpmemobj-cpp-1.5/CMakeLists.txt.orig	2018-10-26 17:55:27.000000000 +0200
-+++ libpmemobj-cpp-1.5/CMakeLists.txt	2018-12-16 08:01:04.654705414 +0100
-@@ -217,7 +217,6 @@
- 		${CMAKE_CURRENT_BINARY_DIR}/libpmemobj++.pc @ONLY)
- 
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpmemobj++.pc
--	CONFIGURATIONS Release Debug
- 	DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
- 
- configure_file(
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libpmemobj-cpp.git/commitdiff/25f517e0656142b0083440ae268c1872fd2401c0



More information about the pld-cvs-commit mailing list