]> git.pld-linux.org Git - packages/freetdi-gala.git/commitdiff
- new master auto/th/freetdi-gala-0-1.20181110.1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 12 May 2019 18:27:13 +0000 (20:27 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 12 May 2019 18:27:13 +0000 (20:27 +0200)
- 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 [new file with mode: 0644]
gala-boost.patch [new file with mode: 0644]
gala-int128.patch [new file with mode: 0644]

diff --git a/freetdi-gala.spec b/freetdi-gala.spec
new file mode 100644 (file)
index 0000000..e4398df
--- /dev/null
@@ -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 (file)
index 0000000..2dad96e
--- /dev/null
@@ -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 (file)
index 0000000..77adb8e
--- /dev/null
@@ -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();
+   }
This page took 0.211754 seconds and 4 git commands to generate.