52e441f
Name:           libsemigroups
458f8c9
Version:        2.7.1
96e421a
Release:        1%{?dist}
52e441f
Summary:        C++ library for semigroups and monoids
52e441f
84fceb2
# libsemigroups itself is GPL-3.0-or-later.
84fceb2
# TextFlow is BSL-1.0.
84fceb2
# All other licenses are due to use of eigen3.
af1d4d0
License:        GPL-3.0-or-later AND BSL-1.0 AND MPL-2.0 AND BSD-3-Clause AND Apache-2.0
7bf63fd
URL:            https://libsemigroups.readthedocs.io/
7bf63fd
Source0:        https://github.com/libsemigroups/libsemigroups/releases/download/v%{version}/%{name}-%{version}.tar.gz
52e441f
ff39d42
BuildRequires:  catch2-devel
52e441f
BuildRequires:  doxygen
52e441f
BuildRequires:  gcc-c++
cc0ba2b
BuildRequires:  libtool
b08f4ac
BuildRequires:  make
00bb56a
BuildRequires:  pkgconfig(eigen3)
cc0ba2b
BuildRequires:  pkgconfig(fmt)
3b7ecef
BuildRequires:  python3-devel
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
84fceb2
# The content is GPL-3.0-or-later.  The other licenses are due to files added
84fceb2
# by Sphinx:
84fceb2
# - searchindex.js: BSD-2-Clause
84fceb2
# - _static/_sphinx_javascript_frameworks_compat.js: BSD-2-Clause
84fceb2
# - _static/basic.css: BSD-2-Clause
84fceb2
# - _static/check-solid.svg: MIT
84fceb2
# - _static/clipboard.min.js: MIT
84fceb2
# - _static/copy-button.svg: MIT
84fceb2
# - _static/copybutton.css: MIT
84fceb2
# - _static/copybutton.js: MIT
84fceb2
# - _static/copybutton_funcs.js: MIT
84fceb2
# - _static/css/badge_only.css: MIT
84fceb2
# - _static/css/theme.css: MIT
84fceb2
# - _static/doctools.js: BSD-2-Clause
84fceb2
# - _static/documentation_options.js: BSD-2-Clause
84fceb2
# - _static/file.png: BSD-2-Clause
84fceb2
# - _static/jquery*.js: MIT
84fceb2
# - _static/js/badge_only.js: MIT
84fceb2
# - _static/js/theme.js: MIT
84fceb2
# - _static/language_data.js: BSD-2-Clause
84fceb2
# - _static/minus.png: BSD-2-Clause
84fceb2
# - _static/plus.png: BSD-2-Clause
84fceb2
# - _static/searchtools.js: BSD-2-Clause
84fceb2
# - _static/underscore*.js: MIT
84fceb2
License:        GPL-3.0-or-later AND BSD-2-Clause AND MIT
52e441f
Summary:        Documentation for %{name}
52e441f
BuildArch:      noarch
cc0ba2b
Requires:       font(fontawesome)
cc0ba2b
Requires:       font(lato)
cc0ba2b
Requires:       font(robotoslab)
52e441f
cfc4364
Provides:       bundled(js-jquery)
cfc4364
Provides:       bundled(js-underscore)
cfc4364
52e441f
%description doc
52e441f
Documentation for %{name}.
52e441f
52e441f
%prep
cc0ba2b
%autosetup -p1
52e441f
edd807c
# Unbundle catch2
edd807c
rm tests/catch.hpp
edd807c
ln -s %{_includedir}/catch2/catch.hpp tests
edd807c
3f499ea
# Do not override Fedora build flags
3f499ea
sed -i 's/ -O3//' Makefile.am
3f499ea
00bb56a
# Regenerate configure due to patch0
00bb56a
autoreconf -fi .
00bb56a
3b7ecef
# Relax python version dependencies
3b7ecef
sed -i 's/==/>=/g' docs/requirements.txt
3b7ecef
3b7ecef
%generate_buildrequires
3b7ecef
%pyproject_buildrequires -N docs/requirements.txt
3b7ecef
cc0ba2b
%build
cc0ba2b
# Hpcombi is an x86-specific library that uses SSE and AVX instructions.
cc0ba2b
# It is not currently available in Fedora, and we cannot assume the
cc0ba2b
# availability of AVX in any case.
81010bb
%configure --disable-silent-rules --disable-static --disable-hpcombi \
00bb56a
  --enable-eigen --with-external-eigen --enable-fmt --with-external-fmt
cc0ba2b
cc0ba2b
# Get rid of undesirable hardcoded rpaths; workaround libtool reordering
cc0ba2b
# -Wl,--as-needed after all the libraries.
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' \
cc0ba2b
    -e 's|CC="\(.*g..\)"|CC="\1 -Wl,--as-needed"|' \
52e441f
    -i libtool
52e441f
52e441f
%make_build
52e441f
%make_build doc
cc0ba2b
rst2html --no-datestamp README.rst README.html
cc0ba2b
rm docs/build/html/.buildinfo
cc0ba2b
52e441f
%install
52e441f
%make_install
52e441f
rm -f %{buildroot}%{_libdir}/*.la
52e441f
31c7977
fixtimestamp() {
31c7977
  touch -r $1.orig $1
31c7977
  rm -f $1.orig
31c7977
}
31c7977
31c7977
# Do not bundle the eigen3 headers
31c7977
rm -fr %{buildroot}%{_includedir}/libsemigroups/Eigen
31c7977
00bb56a
# Do not bundle the fmt headers
00bb56a
rm -fr %{buildroot}%{_includedir}/libsemigroups/fmt
00bb56a
sed -i.orig 's,"\(fmt/[[:alnum:]]*\.h\)",<\1>,g' \
00bb56a
    %{buildroot}%{_includedir}/libsemigroups/report.hpp
31c7977
fixtimestamp %{buildroot}%{_includedir}/libsemigroups/report.hpp
00bb56a
52e441f
%check
cc0ba2b
LD_LIBRARY_PATH=$PWD/.libs make check
52e441f
52e441f
%files
cc0ba2b
%doc README.html
52e441f
%license LICENSE
3f499ea
%{_libdir}/%{name}.so.2
3f499ea
%{_libdir}/%{name}.so.2.*
52e441f
52e441f
%files devel
52e441f
%{_includedir}/%{name}/
52e441f
%{_libdir}/%{name}.so
6b464b0
%{_libdir}/pkgconfig/%{name}.pc
52e441f
52e441f
%files doc
cc0ba2b
%doc docs/build/html
52e441f
%license LICENSE
52e441f
52e441f
%changelog
458f8c9
* Thu Mar 30 2023 Jerry James <loganjerry@gmail.com> - 2.7.1-1
458f8c9
- Version 2.7.1
458f8c9
e6069b6
* Thu Mar 23 2023 Jerry James <loganjerry@gmail.com> - 2.7.0-1
e6069b6
- Version 2.7.0
e6069b6
cfc4364
* Tue Feb 28 2023 Jerry James <loganjerry@gmail.com> - 2.6.2-1
cfc4364
- Version 2.6.2
cfc4364
- Drop upstreamed -pessimizing-move patch
cfc4364
3b7ecef
* Sat Feb 25 2023 Jerry James <loganjerry@gmail.com> - 2.6.1-1
3b7ecef
- Version 2.6.1
3b7ecef
- Dynamically generate python BuildRequires
3b7ecef
- Add -pessimizing-move patch
3b7ecef
96e421a
* Tue Feb  7 2023 Jerry James <loganjerry@gmail.com> - 2.6.0-1
96e421a
- Version 2.6.0
96e421a
3847356
* Wed Feb  1 2023 Jerry James <loganjerry@gmail.com> - 2.5.1-2
3847356
- Explicitly depend on catch version 2
3847356
c133a9d
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
c133a9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
c133a9d
b550c3f
* Thu Jan 12 2023 Jerry James <loganjerry@gmail.com> - 2.5.1-1
b550c3f
- Version 2.5.1
b550c3f
b1d902a
* Wed Dec  7 2022 Jerry James <loganjerry@gmail.com> - 2.4.1-1
b1d902a
- Version 2.4.1
b1d902a
af1d4d0
* Mon Dec  5 2022 Jerry James <loganjerry@gmail.com> - 2.4.0-1
af1d4d0
- Version 2.4.0
af1d4d0
- Refine License tag due to closer analysis of eigen3
af1d4d0
464a326
* Sat Oct 29 2022 Jerry James <loganjerry@gmail.com> - 2.3.2-1
464a326
- Version 2.3.2
464a326
556ff86
* Tue Oct 11 2022 Jerry James <loganjerry@gmail.com> - 2.3.1-1
556ff86
- Version 2.3.1
556ff86
- Remove -fwrapv from the build flags
556ff86
4815289
* Fri Sep 23 2022 Jerry James <loganjerry@gmail.com> - 2.2.3-1
4815289
- Version 2.2.3
4815289
84fceb2
* Mon Sep 12 2022 Jerry James <loganjerry@gmail.com> - 2.2.2-1
84fceb2
- Version 2.2.2
84fceb2
- Convert License tag to SPDX
84fceb2
8334c56
* Sat Aug 13 2022 Jerry James <loganjerry@gmail.com> - 2.2.1-1
8334c56
- Version 2.2.1
8334c56
1fba310
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
1fba310
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
1fba310
f17f295
* Mon Jul 18 2022 Jerry James <loganjerry@gmail.com> - 2.2.0-2
f17f295
- Rebuild for fmt 9.0.0
f17f295
8bcb7d8
* Mon Jul  4 2022 Jerry James <loganjerry@gmail.com> - 2.2.0-1
8bcb7d8
- Version 2.2.0
8bcb7d8
0c061d8
* Fri Apr 22 2022 Jerry James <loganjerry@gmail.com> - 2.1.5-1
0c061d8
- Version 2.1.5
0c061d8
3f499ea
* Mon Mar  7 2022 Jerry James <loganjerry@gmail.com> - 2.1.4-1
3f499ea
- Version 2.1.4
3f499ea
- Drop all patches
3f499ea
41f1400
* Sat Jan 22 2022 Jerry James <loganjerry@gmail.com> - 1.3.7-4
41f1400
- Add -const-map-key and -boolvec patches to fix FTBFS
41f1400
07dd7c2
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-4
07dd7c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
07dd7c2
eb1b7d0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.7-3
eb1b7d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
eb1b7d0
337ebc8
* Mon Jul 05 2021 Richard Shaw <hobbes1069@gmail.com> - 1.3.7-2
337ebc8
- Rebuild for new fmt version.
337ebc8
d67e505
* Mon Mar  1 2021 Jerry James <loganjerry@gmail.com> - 1.3.7-1
d67e505
- Version 1.3.7
d67e505
edd807c
* Sun Feb 21 2021 Jerry James <loganjerry@gmail.com> - 1.3.6-2
edd807c
- Unbundle catch2
edd807c
6b3a248
* Fri Feb  5 2021 Jerry James <loganjerry@gmail.com> - 1.3.6-1
6b3a248
- Version 1.3.6
6b3a248
7bf63fd
* Fri Jan 29 2021 Jerry James <loganjerry@gmail.com> - 1.3.5-1
7bf63fd
- Version 1.3.5
7bf63fd
ee54f87
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-3
ee54f87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ee54f87
12dca2f
* Wed Dec 23 2020 Jerry James <loganjerry@gmail.com> - 1.3.2-2
12dca2f
- Rebuild for sphinxcontrib-bibtex 2.0
12dca2f
bdeaabd
* Sat Oct  3 2020 Jerry James <loganjerry@gmail.com> - 1.3.2-1
bdeaabd
- Version 1.3.2
bdeaabd
81a8772
* Mon Aug 31 2020 Jerry James <loganjerry@gmail.com> - 1.3.1-3
81a8772
- Fix the eigen3-devel dependency from -devel
81a8772
31c7977
* Mon Aug 31 2020 Jerry James <loganjerry@gmail.com> - 1.3.1-2
31c7977
- Do not ship the eigen3 headers in -devel
31c7977
00bb56a
* Mon Aug 31 2020 Jerry James <loganjerry@gmail.com> - 1.3.1-1
00bb56a
- Version 1.3.1
00bb56a
- Add -autoconf patch
00bb56a
- Add BR on eigen3
00bb56a
- Do not ship the fmt headers in -devel
00bb56a
47a3468
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-2
47a3468
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
47a3468
514754c
* Mon Jun 29 2020 Jerry James <loganjerry@gmail.com> - 1.2.1-1
514754c
- Version 1.2.1
514754c
ac8f363
* Fri Jun 12 2020 Jerry James <loganjerry@gmail.com> - 1.1.0-1
ac8f363
- Version 1.1.0
ac8f363
ce4f2f6
* Tue Apr 21 2020 Jerry James <loganjerry@gmail.com> - 1.0.9-1
ce4f2f6
- Version 1.0.9
ce4f2f6
b600235
* Mon Apr 20 2020 Jerry James <loganjerry@gmail.com> - 1.0.8-1
b600235
- Version 1.0.8
b600235
- Drop upstreamed -fmt patch
b600235
c39a8bc
* Thu Apr  9 2020 Jerry James <loganjerry@gmail.com> - 1.0.7-2
c39a8bc
- Add -fmt patch for compatibility with fmt 6.2.0
c39a8bc
ae86a6b
* Sat Mar 21 2020 Jerry James <loganjerry@gmail.com> - 1.0.7-1
ae86a6b
- Version 1.0.7
ae86a6b
- Create font symlinks with fc-match for greater robustness
ae86a6b
873b951
* Sun Feb  9 2020 Jerry James <loganjerry@gmail.com> - 1.0.6-1
873b951
- Version 1.0.6
873b951
cc31d86
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-2
cc31d86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cc31d86
81010bb
* Sat Jan 18 2020 Jerry James <loganjerry@gmail.com> - 1.0.5-1
81010bb
- Version 1.0.5
81010bb
- Drop -unbundle-fmt patch in favor of --with-external-fmt arg to configure
81010bb
cc0ba2b
* Fri Dec 13 2019 Jerry James <loganjerry@gmail.com> - 1.0.3-1
cc0ba2b
- Version 1.0.3
cc0ba2b
- New URLs
cc0ba2b
- Drop -use-after-free patch
cc0ba2b
- Unbundle fmt
cc0ba2b
b72ad53
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.7-2
b72ad53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
b72ad53
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