b5c95a0
Name:           gfan
333264b
Version:        0.6.2
fafa961
Release:        10%{?dist}
b5c95a0
Summary:        Software for Computing Gröbner Fans and Tropical Varieties
333264b
License:        GPLv2+
5a776c1
URL:            http://home.math.au.dk/jensen/software/gfan/gfan.html
5a776c1
Source0:        http://home.math.au.dk/jensen/software/%{name}/%{name}%{version}.tar.gz
2aa9dcd
# Sent upstream 2011 Apr 27.  Fix warnings that could indicate runtime
2aa9dcd
# problems.
333264b
Patch0:         %{name}-warning.patch
7c720a7
# Treat plain "gfan" call as "gfan_bases" call (as done in previous versions)
7c720a7
# instead of warning that "gfan_bases" should be called and exiting
333264b
Patch1:         %{name}-permissive.patch
1f8b44d
# Build a shared library
1f8b44d
Patch2:         %{name}-shared.patch
2aa9dcd
2aa9dcd
BuildRequires:  cddlib-devel
6f902e4
BuildRequires:  gcc-c++
bded37b
BuildRequires:  ghostscript-tools-dvipdf
5cfb611
BuildRequires:  glibc-langpack-en
b5c95a0
BuildRequires:  gmp-devel
ec9da9e
BuildRequires:  make
333264b
BuildRequires:  tex(latex)
333264b
BuildRequires:  tex(ulem.sty)
333264b
BuildRequires:  TOPCOM
b5c95a0
1f8b44d
Requires:       libgfan%{_isa} = %{version}-%{release}
1f8b44d
7c720a7
Suggests:       TOPCOM
b5c95a0
b5c95a0
%description
b5c95a0
The software computes all marked reduced Gröbner bases of an ideal.
b5c95a0
Their union is a universal Gröbner basis. Gfan contains algorithms for
b5c95a0
computing this complex for general ideals and specialized algorithms
b5c95a0
for tropical curves, tropical hypersurfaces and tropical varieties of
b5c95a0
prime ideals. In addition to the above core functions the package
b5c95a0
contains many tools which are useful in the study of Gröbner bases,
b5c95a0
initial ideals and tropical geometry. Among these are an interactive
b5c95a0
traversal program for Gröbner fans and programs for graphical renderings.
b5c95a0
3794d54
%package        doc
3794d54
Summary:        Gfan examples and documentation files
3794d54
Requires:       %{name}%{?_isa} = %{version}-%{release}
3794d54
3794d54
%description    doc
3794d54
Gfan examples and documentation files.
b5c95a0
1f8b44d
%package        -n libgfan
1f8b44d
Summary:        Polyhedral computations related to polynomial rings
1f8b44d
1f8b44d
%description    -n libgfan
1f8b44d
Gfanlib has two major features:
1f8b44d
1) high-level exact polyhedral cone and polyhedral fan classes;
1f8b44d
2) fast exact mixed volume computation for lattice polytopes with overflow
1f8b44d
   checking.
1f8b44d
1f8b44d
In particular, gfanlib is missing the Gröbner basis part of gfan.
1f8b44d
1f8b44d
%package        -n libgfan-devel
1f8b44d
Summary:        Development files for libgfan
1f8b44d
Requires:       libgfan%{?_isa} = %{version}-%{release}
1f8b44d
Requires:       gmp-devel%{?_isa}
1f8b44d
1f8b44d
%description    -n libgfan-devel
1f8b44d
The libgfan-devel package contains libraries and header files for
1f8b44d
developing applications that use libgfan.
1f8b44d
b5c95a0
%prep
b5c95a0
%setup -q -n %{name}%{version}
b5c95a0
%patch0
2aa9dcd
%patch1
1f8b44d
%patch2
2aa9dcd
2aa9dcd
# Point to where the TOPCOM binaries will be installed
1f8b44d
sed -i.orig "s|^\(#define MINKOWSKIPROGRAM \).*|\1\"%{_bindir}/essai\"|" \
333264b
  src/minkowskisum.cpp
1f8b44d
touch -r src/minkowskisum.cpp.orig src/minkowskisum.cpp
1f8b44d
rm -f src/minkowskisum.cpp.orig
b5c95a0
3794d54
# No need to install a simple upstream Makefile to rsync homepage
3794d54
# directory to upstream page.
3794d54
rm -f homepage/Makefile
b5c95a0
b5c95a0
%build
ec9da9e
%make_build CC=gcc CXX=g++ \
333264b
  OPTFLAGS="%{optflags} -DGMPRATIONAL -I%{_includedir}/cddlib" \
5a776c1
  PREFIX=%{_prefix} \
1f8b44d
  SOPLEX_LINKOPTIONS="-Wl,--as-needed $RPM_LD_FLAGS"
333264b
333264b
# Build the manual
333264b
pushd doc
333264b
latex manual.tex
333264b
bibtex manual
333264b
latex manual.tex
333264b
latex manual.tex
333264b
dvipdf manual.dvi manual.pdf
333264b
popd
b5c95a0
b5c95a0
%install
1f8b44d
# Install the library
1f8b44d
mkdir -p %{buildroot}%{_libdir}
1f8b44d
cp -p src/libgfan.so.0.0.0 %{buildroot}%{_libdir}
1f8b44d
ln -s libgfan.so.0.0.0 %{buildroot}%{_libdir}/libgfan.so.0
1f8b44d
ln -s libgfan.so.0 %{buildroot}%{_libdir}/libgfan.so
1f8b44d
1f8b44d
# Install the headers
1f8b44d
mkdir -p %{buildroot}%{_includedir}/gfanlib
1f8b44d
cp -p src/gfanlib*.h %{buildroot}%{_includedir}/gfanlib
1f8b44d
1f8b44d
# Fix the headers
1f8b44d
for fil in %{buildroot}%{_includedir}/gfanlib/*.h; do
1f8b44d
  sed -i.orig 's,#include "\(.*\)",#include <\1>,' $fil
1f8b44d
  touch -r $fil.orig $fil
1f8b44d
  rm $fil.orig
1f8b44d
done
1f8b44d
1f8b44d
# Install the binaries
1f8b44d
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
333264b
make install PREFIX=%{buildroot}%{_prefix}
333264b
pushd %{buildroot}%{_bindir}
3794d54
    ./%{name} installlinks
b5c95a0
popd
b5c95a0
1f8b44d
5a776c1
%check
1f8b44d
# Some tests depend on US English collation order
1f8b44d
export LC_ALL=en_US.UTF-8
1f8b44d
5a776c1
# The xfig test output varies slightly by architecture, and is non-critical,
5a776c1
# so we skip that test.
5a776c1
rm -fr testsuite/0009RenderStairCase
1f8b44d
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
5a776c1
./gfan _test
b5c95a0
b5c95a0
1f8b44d
%ldconfig_scriptlets -n libgfan
1f8b44d
1f8b44d
b5c95a0
%files
333264b
%doc README doc/manual.pdf
4fdcc68
%license COPYING LICENSE
3794d54
%{_bindir}/*
b5c95a0
3794d54
%files          doc
3794d54
%doc examples
3794d54
%doc homepage
b5c95a0
1f8b44d
%files -n libgfan
1f8b44d
%doc gfanlib/README.txt
1f8b44d
%{_libdir}/*.so.*
1f8b44d
1f8b44d
%files -n libgfan-devel
1f8b44d
%{_includedir}/gfanlib/
1f8b44d
%{_libdir}/*.so
1f8b44d
1f8b44d
b5c95a0
%changelog
fafa961
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-10
fafa961
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
fafa961
b88184f
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-9
b88184f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b88184f
c0c070f
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-8
c0c070f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c0c070f
7855efc
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7
7855efc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7855efc
2f8c3c0
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.2-6
2f8c3c0
- Add BR:glibc-langpack-en
2f8c3c0
  See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
2f8c3c0
20155fe
* Sat Oct 13 2018 Jerry James <loganjerry@gmail.com> - 0.6.2-5
20155fe
- Rebuild for cddlib 0.94j
20155fe
37ec2af
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-4
37ec2af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
37ec2af
1f8b44d
* Sat Jun  2 2018 Jerry James <loganjerry@gmail.com> - 0.6.2-3
1f8b44d
- Build and link with libgfan.so
1f8b44d
ce79a3d
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
ce79a3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ce79a3d
333264b
* Thu Sep 28 2017 Jerry James <loganjerry@gmail.com> - 0.6.2-1
333264b
- New upstream release
333264b
- License change to GPLv2+
333264b
- Manual is now free
333264b
- Drop upstreamed -format patch
333264b
- Drop unnecessary -respect-destdir patch
333264b
b986939
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-18
b986939
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b986939
184fa33
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-17
184fa33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
184fa33
8f626eb
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-16
8f626eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8f626eb
ab304be
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-15
ab304be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
ab304be
e7271fe
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-14
e7271fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e7271fe
619f682
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.5-13
619f682
- Rebuilt for GCC 5 C++11 ABI change
619f682
5a776c1
* Tue Mar 10 2015 Jerry James <loganjerry@gmail.com> - 0.5-12
5a776c1
- Update URLs
5a776c1
- Link with RPM_LD_FLAGS
5a776c1
- Reenable tests
5a776c1
4fdcc68
* Tue Feb 17 2015 Jerry James <loganjerry@gmail.com> - 0.5-11
4fdcc68
- Use license macro
4fdcc68
e1c4634
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-10
e1c4634
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e1c4634
88e685d
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-9
88e685d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
88e685d
Jerry James 692f689
* Thu Oct  3 2013 Jerry James <loganjerry@gmail.com> - 0.5-8
Jerry James 692f689
- Update the project and source URLs
Jerry James 692f689
- Minor spec file cleanups
Jerry James 692f689
9c6c0c3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-7
9c6c0c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9c6c0c3
e9bb5a6
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
e9bb5a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e9bb5a6
8a648e1
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
8a648e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8a648e1
16304d7
* Fri Jul 6 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.5-5
16304d7
- Disable back %%check as it fails only in ix86.
16304d7
3794d54
* Thu Jul 5 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.5-4
3794d54
- Use gfan itself to create symlinks.
3794d54
- Create -doc subpackage and install the homepage dir as documentation.
3794d54
- Reenable %%check.
3794d54
- Add -permissive patch for sagemath interface.
3794d54
c24cf61
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
c24cf61
- Rebuilt for c++ ABI breakage
c24cf61
Jerry James 692f689
* Mon Jan  9 2012 Jerry James <loganjerry@gmail.com> - 0.5-2
b772e14
- Rebuild for GCC 4.7
b772e14
Marcela Mašláňová 0f2c100
* Thu Oct 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.5-1.2
Marcela Mašláňová 0f2c100
- rebuild with new gmp without compat lib
Marcela Mašláňová 0f2c100
Marcela Mašláňová fe88dd5
* Tue Oct 11 2011 Peter Schiffer <pschiffe@redhat.com> - 0.5-1.1
Marcela Mašláňová fe88dd5
- rebuild with new gmp
Marcela Mašláňová fe88dd5
2aa9dcd
* Mon Apr 25 2011 Jerry James <loganjerry@gmail.com> - 0.5-1
2aa9dcd
- New upstream release.
2aa9dcd
- Drop BuildRoot tag, clean script, and clean at start of install script.
2aa9dcd
- Build against shared cddlib now that it is available.
ec15435
- Fix some broken tests.
ec15435
- Still cannot run the testsuite, as the tests will pass on one build attempt
ec15435
  and then fail on another.  There is a Heisenbug somewhere....
2aa9dcd
557da6d
* Tue Dec  8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.3-7
557da6d
- Explicitly BR cddlib-static in accordance with the Packaging
557da6d
  Guidelines (cddlib-devel is still static-only).
557da6d
dfeca71
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-6
dfeca71
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
dfeca71
5a3791c
* Thu Feb 26 2009 Conrad Meyer <konrad@tylerc.org> - 0.3-5
5a3791c
- Include the right place for headers (fix FTBFS).
5a3791c
5fa7c7c
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
5fa7c7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5fa7c7c
b5c95a0
* Tue Dec 30 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-3
b5c95a0
- Fix License tag.
b5c95a0
- Fix build section.
b5c95a0
- Remove doc/ in prep stage as it is non-free.
b5c95a0
b5c95a0
* Fri Dec 12 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-2
b5c95a0
- BR texlive-latex.
b5c95a0
b5c95a0
* Sat Dec 6 2008 Conrad Meyer <konrad@tylerc.org> - 0.3-1
b5c95a0
- Initial package.