[packages/freetdi-gala] - added c++20 fix from git; release 2

qboosh qboosh at pld-linux.org
Fri May 31 22:05:02 CEST 2024


commit 62f397cc7a4bffe47e559e95bd75d267990682bf
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri May 31 21:58:01 2024 +0200

    - added c++20 fix from git; release 2

 freetdi-gala.spec |   6 ++-
 gala-c++2a.patch  | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 155 insertions(+), 2 deletions(-)
---
diff --git a/freetdi-gala.spec b/freetdi-gala.spec
index 0d2d304..69d8179 100644
--- a/freetdi-gala.spec
+++ b/freetdi-gala.spec
@@ -7,7 +7,7 @@ Summary:	C++ graph implementation
 Summary(pl.UTF-8):	Implementacja grafów w C++
 Name:		freetdi-gala
 Version:	1
-Release:	1
+Release:	2
 License:	GPL v3+
 Group:		Libraries
 #Source0Download; https://github.com/freetdi/gala/releases
@@ -16,6 +16,7 @@ Source0:	https://github.com/freetdi/gala/archive/%{version}/gala-%{version}.tar.
 Patch0:		gala-int128.patch
 Patch1:		gala-boost.patch
 Patch2:		gala-includes.patch
+Patch3:		gala-c++2a.patch
 URL:		https://github.com/freetdi/gala
 %if %{with tests}
 BuildRequires:	boost-devel
@@ -55,6 +56,7 @@ danych, mając do nich pełny dostęp - na własną odpowiedzialność.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 # not autoconf configure
@@ -66,7 +68,7 @@ danych, mając do nich pełny dostęp - na własną odpowiedzialność.
 %if %{with tests}
 %{__make} check \
 	CXX="%{__cxx}" \
-	LOCAL_CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} -std=gnu++11"
+	LOCAL_CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}"
 %endif
 
 %install
diff --git a/gala-c++2a.patch b/gala-c++2a.patch
new file mode 100644
index 0000000..176a6fa
--- /dev/null
+++ b/gala-c++2a.patch
@@ -0,0 +1,151 @@
+From 8fa7f7a612b7b72206884788b0481133e48fd9e1 Mon Sep 17 00:00:00 2001
+From: Felix Salfelder <felix at salfelder.org>
+Date: Tue, 20 Jul 2021 00:00:00 +0100
+Subject: [PATCH] fix default argument woes with c++2a
+
+---
+ boost.h                      | 18 ++++++++++--------
+ graph.h                      | 30 ++++++++++--------------------
+ tests/Makefile               |  2 +-
+ tests/{cbsg.cc => cbsg.0.cc} |  0
+ 4 files changed, 21 insertions(+), 29 deletions(-)
+ rename tests/{cbsg.cc => cbsg.0.cc} (100%)
+
+diff --git a/boost.h b/boost.h
+index c1ea8b0..6bf9fcf 100644
+--- a/boost.h
++++ b/boost.h
+@@ -238,11 +238,13 @@ namespace boost { //
+ 			// base+=n;
+ 				std::advance(base,n);
+ 			}
+-			vertex_iterator(typename gala::graph<SGARGS>::iterator
+-			    e=typename gala::graph<SGARGS>::iterator(),
+-			    const gala::graph<SGARGS>*g=NULL)
+-			        : base(e)
+-			{
++			vertex_iterator() : base(typename gala::graph<SGARGS>::iterator()) { untested();
++			}
++			vertex_iterator(typename gala::graph<SGARGS>::iterator e) : base(e) { untested();
++			}
++			vertex_iterator(typename gala::graph<SGARGS>::iterator e,
++			    const gala::graph<SGARGS>*g)
++			        : base(e) { untested();
+ 				(void)g;
+ 			}
+ 			vertex_iterator(const vertex_iterator& p)
+@@ -316,9 +318,9 @@ namespace boost { //
+ //		   typedef typename gala::graph<SGARGS>::vertex_type* difference_type; ??
+ 		   typedef intptr_t difference_type; // why?
+ 		public:
+-			adjacency_iterator(typename ::gala::graph<SGARGS>::out_vertex_iterator
+-			    e=typename gala::graph<SGARGS>::out_vertex_iterator()) : _base(e)
+-			{
++			adjacency_iterator() : _base(typename gala::graph<SGARGS>::out_vertex_iterator()) { untested();
++			}
++			adjacency_iterator(typename ::gala::graph<SGARGS>::out_vertex_iterator e) : _base(e) { untested();
+ 			}
+ 			bool operator==(const_value_type other) const
+ 			{ untested();
+diff --git a/graph.h b/graph.h
+index cd21795..ed010ff 100644
+--- a/graph.h
++++ b/graph.h
+@@ -53,7 +53,7 @@
+ namespace gala{
+ /*--------------------------------------------------------------------------*/
+ /*--------------------------------------------------------------------------*/
+-struct vertex_ptr_tag {}; // not in use yet.
++struct vertex_ptr_tag {};
+ /*--------------------------------------------------------------------------*/
+ #define galaPARMS    template<class T, typename... > class ECT, \
+                      template<class T, typename... > class VCT, \
+@@ -567,24 +567,20 @@ struct storage : storage_base<STARGS>{ //
+ 	typedef edge_type_<vertex_type> edge_type;
+ 	typedef ECT<vertex_type> edge_container_type; // -> storage base?
+ 	typedef VCT<vertex_> VL;
+-	static bool need_rewire()
+-	{ untested();
++	static bool need_rewire() { untested();
+ 		return false;
+ 	}
+-	static vertex_type new_node(container_type& _v)
+-	{
++	static vertex_type new_node(container_type& _v) {
+ 		vertex_ n;
+ 		auto s=_v.size();
+ 		_v.push_back(n);
+ 		return s;
+ 	}
+-	static VDP degree(const VDP v, container_type const& _v)
+-	{
++	static VDP degree(const VDP v, container_type const& _v) {
+ 		assert(v<_v.size());
+ 		return _v[v].size();
+ 	}
+-	static VDP degree(container_type const& _v)
+-	{ untested();
++	static VDP degree(container_type const& _v) { untested();
+ 		vertex_index_type ret=0;
+ 		for(auto const& e : _v){ untested();
+ 			vertex_index_type d = e.size();
+@@ -592,20 +588,16 @@ struct storage : storage_base<STARGS>{ //
+ 		}
+ 		return ret;
+ 	}
+-	static void clear_vertex(const VDP v, container_type& _v)
+-	{ untested();
++	static void clear_vertex(const VDP v, container_type& _v) { untested();
+ 		_v[v].clear();
+ 	}
+-	static edge_container_type& out_edges(vertex_type& v, container_type& _v)
+-	{
++	static edge_container_type& out_edges(vertex_type& v, container_type& _v) {
+ 		return _v[v];
+ 	}
+-	static edge_container_type& out_edges(const_vertex_type& v, container_type& _v)
+-	{
++	static edge_container_type& out_edges(const_vertex_type& v, container_type& _v) {
+ 		return _v[v];
+ 	}
+-	static const edge_container_type& out_edges(const_vertex_type& v, const container_type& _v)
+-	{ itested();
++	static const edge_container_type& out_edges(const_vertex_type& v, const container_type& _v) { itested();
+ 		return _v[v];
+ 	}
+ 	static void remove_edge_single(vertex_index_type v, vertex_index_type w,
+@@ -765,8 +757,6 @@ struct edge_helper<STARGS, false, true, is_symmetric> : public storage<STARGS>{
+ 	static std::pair<edge_type, bool> add_edge(vertex_type a, vertex_type b,
+ 	                                           N& num_edges, VC& vc)
+ 	{
+-
+-		// trace0("undiredted add_edge");
+ 		vertex_type* A=&a;
+ 		vertex_type* B=&b;
+ 		size_t s = out_edges(*A, vc).size();
+@@ -1271,7 +1261,7 @@ template< template<class T, typename... > class ECT=GALA_DEFAULT_SET,
+           template<class T, typename... > class VCT=GALA_DEFAULT_VECTOR,
+           typename VDP=vertex_ptr_tag, // use_pointers,
+           template<class G> class CFG=graph_cfg_default>
+-class graph{ //
++class graph {
+ 	BOOST_STATIC_ASSERT( (std::numeric_limits<VDP>::is_integer
+ 	                 && !std::numeric_limits<VDP>::is_signed )
+ 						  || std::is_same<VDP, vertex_ptr_tag>::value );
+#diff --git a/tests/Makefile b/tests/Makefile
+#index d565467..1a9e81c 100644
+#--- a/tests/Makefile
+#+++ b/tests/Makefile
+#@@ -7,7 +7,7 @@ TESTS = \
+# 	bidir \
+# 	bmd \
+# 	cbs \
+#-	cbsg \
+#+	cbsg.0 \
+# 	cbsg_cp \
+# 	concepts \
+# 	copy \
+#diff --git a/tests/cbsg.cc b/tests/cbsg.0.cc
+#similarity index 100%
+#rename from tests/cbsg.cc
+#rename to tests/cbsg.0.cc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/freetdi-gala.git/commitdiff/62f397cc7a4bffe47e559e95bd75d267990682bf



More information about the pld-cvs-commit mailing list