--- /dev/null
+# 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}
--- /dev/null
+* 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>