52e441f
Name:           libsemigroups
6b464b0
Version:        0.6.7
6b464b0
Release:        1%{?dist}
52e441f
Summary:        C++ library for semigroups and monoids
52e441f
52e441f
License:        GPLv3+
52e441f
URL:            https://github.com/james-d-mitchell/%{name}
52e441f
Source0:        https://github.com/james-d-mitchell/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
fb00c21
# https://github.com/james-d-mitchell/libsemigroups/issues/60
fb00c21
Patch0:         %{name}-use-after-free.patch
52e441f
52e441f
BuildRequires:  doxygen
52e441f
BuildRequires:  gcc-c++
52e441f
52e441f
%description
52e441f
Libsemigroups is a C++ library for semigroups and monoids; it is partly
52e441f
based on "Algorithms for computing finite semigroups", "Expository
52e441f
Slides", and Semigroupe 2.01 by Jean-Eric Pin.
52e441f
52e441f
The libsemigroups library is used in the Semigroups package for GAP.
52e441f
52e441f
Some of the features of Semigroupe 2.01 are not yet implemented in
52e441f
libsemigroups; this is a work in progress.  Missing features include
52e441f
those for:
52e441f
52e441f
- Green's relations, or classes
52e441f
- finding a zero
52e441f
- minimal ideal, principal left/right ideals, or indeed any ideals
52e441f
- inverses
52e441f
- local submonoids
52e441f
- the kernel
52e441f
- variety tests.
52e441f
These will be included in a future version.
52e441f
52e441f
Libsemigroups performs roughly the same as Semigroupe 2.01 when there is
52e441f
a known upper bound on the size of the semigroup being enumerated, and
52e441f
this is used to initialize the data structures for the semigroup; see
52e441f
libsemigroups::Semigroup::reserve for more details.  Note that in
52e441f
Semigroupe 2.01 it is always necessary to provide such an upper bound,
52e441f
but in libsemigroups it is not.
52e441f
52e441f
Libsemigroups also has some advantages over Semigroupe 2.01:
52e441f
- there is a (hopefully) convenient C++ API, which makes it relatively
52e441f
  easy to create and manipulate semigroups and monoids
52e441f
- there are some multithreaded methods for semigroups and their
52e441f
  congruences
52e441f
- you do not have to know/guess the size of a semigroup or monoid before
52e441f
  you begin
52e441f
- libsemigroups supports more types of elements than Semigroupe 2.01
52e441f
- it is relatively straightforward to add support for further types of
52e441f
  elements and semigroups
52e441f
- it is possible to enumerate a certain number of elements of a
52e441f
  semigroup or monoid (say if you are looking for an element with a
52e441f
  particular property), to stop, and then to start the enumeration again
52e441f
  at a later point
52e441f
- you can instantiate as many semigroups and monoids as you can fit in
52e441f
  memory
52e441f
- it is possible to add more generators after a semigroup or monoid has
52e441f
  been constructed, without losing or having to recompute any
52e441f
  information that was previously known
52e441f
- libsemigroups contains rudimentary implementations of the Todd-Coxeter
52e441f
  and Knuth-Bendix algorithms for finitely presented semigroups, which
52e441f
  can also be used to compute congruences of a (not necessarily finitely
52e441f
  presented) semigroup or monoid.
52e441f
52e441f
%package devel
52e441f
Summary:        Headers files for developing with %{name}
52e441f
Requires:       %{name}%{?_isa} = %{version}-%{release}
52e441f
52e441f
%description devel
52e441f
Header files for developing applications that use %{name}.
52e441f
52e441f
%package doc
52e441f
Summary:        Documentation for %{name}
52e441f
BuildArch:      noarch
52e441f
52e441f
%description doc
52e441f
Documentation for %{name}.
52e441f
52e441f
%prep
fb00c21
%autosetup -p0
52e441f
2740e45
# Do not override Fedora CFLAGS
2740e45
sed -i 's/ -g -O3 -march=native//' Makefile.in
2740e45
52e441f
%build
52e441f
%configure --disable-silent-rules --disable-static
52e441f
52e441f
# Eliminate hardcoded rpaths
52e441f
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
52e441f
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
52e441f
    -i libtool
52e441f
# The -pthread flag doesn't actually link with libpthread
52e441f
sed -i 's/^LIBS =.*/&-lpthread/' Makefile
52e441f
52e441f
%make_build
52e441f
%make_build doc
52e441f
52e441f
%install
52e441f
%make_install
52e441f
rm -f %{buildroot}%{_libdir}/*.la
52e441f
52e441f
%check
1a4a194
export LD_LIBRARY_PATH=$PWD/.libs
52e441f
make check
52e441f
13a8bc6
%ldconfig_scriptlets
52e441f
52e441f
%files
52e441f
%doc README.md
52e441f
%license LICENSE
52e441f
%{_libdir}/%{name}.so.*
52e441f
52e441f
%files devel
52e441f
%{_includedir}/%{name}/
52e441f
%{_libdir}/%{name}.so
6b464b0
%{_libdir}/pkgconfig/%{name}.pc
52e441f
52e441f
%files doc
52e441f
%doc html
52e441f
%license LICENSE
52e441f
52e441f
%changelog
6b464b0
* Tue Apr 23 2019 Jerry James <loganjerry@gmail.com> - 0.6.7-1
6b464b0
- New upstream version
6b464b0
76250f6
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-2
76250f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
76250f6
5b8c2bf
* Mon Oct 22 2018 Jerry James <loganjerry@gmail.com> - 0.6.4-1
5b8c2bf
- New upstream version
5b8c2bf
ed4dffd
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-2
ed4dffd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ed4dffd
13a8bc6
* Sat Mar 10 2018 Jerry James <loganjerry@gmail.com> - 0.6.3-1
13a8bc6
- New upstream version
13a8bc6
d31ce32
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
d31ce32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d31ce32
2740e45
* Sat Jan 13 2018 Jerry James <loganjerry@gmail.com> - 0.6.2-1
2740e45
- New upstream version
2740e45
fb00c21
* Sat Dec 30 2017 Jerry James <loganjerry@gmail.com> - 0.6.1-1
fb00c21
- New upstream version
fb00c21
- Add -use-after-free patch to fix test failures
fb00c21
9807008
* Tue Dec 12 2017 Jerry James <loganjerry@gmail.com> - 0.6.0-1
9807008
- New upstream version
9807008
e5fdb8a
* Sat Oct  7 2017 Jerry James <loganjerry@gmail.com> - 0.5.2-1
e5fdb8a
- New upstream version
e5fdb8a
1a4a194
* Sat Sep 30 2017 Jerry James <loganjerry@gmail.com> - 0.5.0-1
1a4a194
- New upstream version
1a4a194
4b65c4b
* Mon Sep  4 2017 Jerry James <loganjerry@gmail.com> - 0.3.2-1
4b65c4b
- New upstream version
4b65c4b
52e441f
* Sun Jul 30 2017 Jerry James <loganjerry@gmail.com> - 0.3.1-3
52e441f
- Install the license with the -doc subpackage
52e441f
- Make -doc noarch
52e441f
52e441f
* Sat Jul 29 2017 Jerry James <loganjerry@gmail.com> - 0.3.1-2
52e441f
- Move documentation to a -doc subpackage
52e441f
- Link with libpthread to fix an undefined non-weak symbol
52e441f
- Kill the rpath
52e441f
52e441f
* Thu Jul 27 2017 Jerry James <loganjerry@gmail.com> - 0.3.1-1
52e441f
- Initial RPM