[packages/freetdi-gala] - new - int128 patch to disable code using __uint128_t when it's not supported by gcc - boost patch

qboosh qboosh at pld-linux.org
Sun May 12 20:26:43 CEST 2019


commit 5020cfeac967aff55bee4db0389742390bd3c20f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 12 20:27:13 2019 +0200

    - new
    - int128 patch to disable code using __uint128_t when it's not supported by gcc
    - boost patch to fix some specializations for boost flat_set changes

 freetdi-gala.spec | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gala-boost.patch  | 31 +++++++++++++++++++
 gala-int128.patch | 20 +++++++++++++
 3 files changed, 140 insertions(+)
---
diff --git a/freetdi-gala.spec b/freetdi-gala.spec
new file mode 100644
index 0000000..e4398df
--- /dev/null
+++ b/freetdi-gala.spec
@@ -0,0 +1,89 @@
+# NOTE: "gala" package name was already occupied, so project name prefix was added.
+#
+# Conditional build:
+%bcond_without	tests		# unit tests
+#
+Summary:	C++ graph implementation
+Summary(pl.UTF-8):	Implementacja grafów w C++
+Name:		freetdi-gala
+# release "0" has some bugs/got some later improvements (conditional stx, DESTDIR support etc.), use post-0 snapshot
+%define	gitref	19bcf7614c428f2b27f005d154aa546f96f83c74
+%define	snap	20181110
+Version:	0
+Release:	1.%{snap}.1
+License:	GPL v3+
+Group:		Libraries
+#Source0Download; https://github.com/freetdi/gala/releases
+#Source0:	https://github.com/freetdi/gala/archive/%{version}/gala-%{version}.tar.gz
+Source0:	https://github.com/freetdi/gala/archive/%{gitref}/gala-%{snap}.tar.gz
+# Source0-md5:	0f7fdff6ad63092419919a880f7469d5
+Patch0:		gala-int128.patch
+Patch1:		gala-boost.patch
+URL:		https://github.com/freetdi/gala
+%if %{with tests}
+BuildRequires:	boost-devel
+BuildRequires:	libstdc++-devel >= 6:4.7
+%endif
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+gala is a C++ graph implementation inspired by boost/BGL, but with low
+level access. You choose the containers and data types and get full
+access - at your own risk.
+
+%description -l pl.UTF-8
+gala to implementacja grafów zainspirowana przez boost/EGL, ale z
+niskopoziomowym dostępem. Można wybrać dowolne kontenery i typy
+danych, mając do nich pełny dostęp - na własną odpowiedzialność.
+
+%package devel
+Summary:	C++ graph implementation
+Summary(pl.UTF-8):	Implementacja grafów w C++
+Group:		Development/Libraries
+Requires:	libstdc++-devel >= 6:4.7
+
+%description devel
+gala is a C++ graph implementation inspired by boost/BGL, but with low
+level access. You choose the containers and data types and get full
+access - at your own risk.
+
+%description devel -l pl.UTF-8
+gala to implementacja grafów zainspirowana przez boost/EGL, ale z
+niskopoziomowym dostępem. Można wybrać dowolne kontenery i typy
+danych, mając do nich pełny dostęp - na własną odpowiedzialność.
+
+%prep
+%setup -q -n gala-%{gitref}
+%patch0 -p1
+%patch1 -p1
+
+%build
+# not autoconf configure
+./configure \
+	--prefix=%{_prefix}
+
+%{__make}
+
+%if %{with tests}
+%{__make} check \
+	CXX="%{__cxx}" \
+	LOCAL_CXXFLAGS="%{rpmcxxflags} %{rpmcppflags} -std=gnu++11"
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}
+cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files devel
+%defattr(644,root,root,755)
+%doc README TODO
+%{_includedir}/gala
+%{_examplesdir}/%{name}-%{version}
diff --git a/gala-boost.patch b/gala-boost.patch
new file mode 100644
index 0000000..2dad96e
--- /dev/null
+++ b/gala-boost.patch
@@ -0,0 +1,31 @@
+* vertex_iterator::operator+(size_t) is ambiguous with boost::iterator_facade::operator+
+* is_same<S, boost::container::flat_set<typename S::value_type, typename S::key_compare, typename S::allocator_type>
+  is false with S=boost::container::flat_set<T> (when using default allocator)
+--- gala-19bcf7614c428f2b27f005d154aa546f96f83c74/boost.h.orig	2018-11-09 13:44:07.000000000 +0100
++++ gala-19bcf7614c428f2b27f005d154aa546f96f83c74/boost.h	2019-05-12 14:54:45.483009816 +0200
+@@ -259,7 +259,7 @@
+ 					a.advance(n);
+ 					return std::move(a);
+ 				}
+-#else
++#elif 0
+ 			vertex_iterator operator+(size_t n) {
+ 				vertex_iterator a=*this;
+ 				a.advance(n);
+--- gala-19bcf7614c428f2b27f005d154aa546f96f83c74/sfinae.h.orig	2018-11-09 13:44:07.000000000 +0100
++++ gala-19bcf7614c428f2b27f005d154aa546f96f83c74/sfinae.h	2019-05-12 18:43:37.785282218 +0200
+@@ -93,6 +93,14 @@
+ 	typedef T type;
+ 	static constexpr bool value = true;
+ };
++template<class S, class T>
++struct is_set<S, typename std::enable_if < std::is_same<
++boost::container::flat_set<typename S::value_type, typename S::key_compare, void>, S
++>::value, any >::type , T>{ //
++
++	typedef T type;
++	static constexpr bool value = true;
++};
+ /*--------------------------------------------------------------------------*/
+ /*--------------------------------------------------------------------------*/
+ template<class A, class B=any, class T=void>
diff --git a/gala-int128.patch b/gala-int128.patch
new file mode 100644
index 0000000..77adb8e
--- /dev/null
+++ b/gala-int128.patch
@@ -0,0 +1,20 @@
+gcc supports __int128 on 64-bit archs only
+--- gala-19bcf7614c428f2b27f005d154aa546f96f83c74/cbset.h.orig	2018-11-09 13:44:07.000000000 +0100
++++ gala-19bcf7614c428f2b27f005d154aa546f96f83c74/cbset.h	2019-05-12 11:36:36.640750532 +0200
+@@ -1337,7 +1337,7 @@
+     return ret;
+ 
+   }else if(false && W<=16){ untested();
+-
++#ifdef __SIZEOF_INT128__
+     assert(CHUNKBITS==8);
+     // 64 = 8x8 bit...
+     __uint128_t ret=0;
+@@ -1349,6 +1349,7 @@
+ 
+     altret = ret; // % nHash;
+     return altret;
++#endif
+   }else{ untested();
+   }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/freetdi-gala.git/commitdiff/5020cfeac967aff55bee4db0389742390bd3c20f



More information about the pld-cvs-commit mailing list