b5c95a0
Name:           gfan
2aa9dcd
Version:        0.5
2aa9dcd
Release:        1%{?dist}
b5c95a0
Summary:        Software for Computing Gröbner Fans and Tropical Varieties
b5c95a0
Group:          Applications/Engineering
b5c95a0
License:        GPL+
2aa9dcd
URL:            http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html
2aa9dcd
Source0:        http://www.math.tu-berlin.de/~jensen/software/gfan/gfan%{version}.tar.gz
2aa9dcd
# Sent upstream 2011 Apr 27.  Respect DESTDIR
2aa9dcd
Patch0:         gfan-respect-destdir.patch
2aa9dcd
# Sent upstream 2011 Apr 27.  Fix 64-bit issues in printf statements by
2aa9dcd
# using %%zu instead of %%i for printing size_t values.
2aa9dcd
Patch1:         gfan-format.patch
2aa9dcd
# Sent upstream 2011 Apr 27.  Fix warnings that could indicate runtime
2aa9dcd
# problems.
2aa9dcd
Patch2:         gfan-warning.patch
2aa9dcd
2aa9dcd
BuildRequires:  cddlib-devel
b5c95a0
BuildRequires:  gmp-devel
b5c95a0
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
b5c95a0
b5c95a0
%prep
b5c95a0
%setup -q -n %{name}%{version}
b5c95a0
%patch0
2aa9dcd
%patch1
2aa9dcd
%patch2
2aa9dcd
2aa9dcd
# manual is non-free
2aa9dcd
rm -rf doc
2aa9dcd
2aa9dcd
# Point to where the TOPCOM binaries will be installed
2aa9dcd
sed -i \
2aa9dcd
  "s|^#define MINKOWSKIPROG.*|#define MINKOWSKIPROGRAM \"%{_bindir}/essai\"|" \
2aa9dcd
  minkowskisum.cpp
2aa9dcd
2aa9dcd
# Fix the tests
2aa9dcd
sed -i 's/^%s/%s _bases/' \
2aa9dcd
    testsuite/0000InstallationSection/command \
2aa9dcd
    testsuite/0001GroebnerFan/command \
2aa9dcd
    testsuite/0003GroebnerFanMod3/command \
2aa9dcd
    testsuite/0004GroebnerFanSymmetry/command \
2aa9dcd
    testsuite/0007LeadingTerms/command \
2aa9dcd
    testsuite/0008PolynomialSetUnion/command \
2aa9dcd
    testsuite/0100SymmetricGfan/command \
2aa9dcd
    testsuite/0100TwoVariables/command
2aa9dcd
sed -i 's/^gfan/%s/' \
2aa9dcd
    testsuite/0507InitialIdeal/command \
2aa9dcd
    testsuite/0508IntegerGroebnerCone/command \
2aa9dcd
    testsuite/0509IntegerGroebnerFan/command
2aa9dcd
sed -i 's|func.poly|testsuite/0056WeildDivisor/func.poly|g' \
2aa9dcd
    testsuite/0056WeildDivisor/command
b5c95a0
b5c95a0
b5c95a0
%build
2aa9dcd
make %{?_smp_mflags} \
2aa9dcd
  OPTFLAGS="%{optflags} -DGMPRATIONAL -I/usr/include/cddlib" \
2aa9dcd
  PREFIX=%{_prefix}
b5c95a0
b5c95a0
b5c95a0
%install
2aa9dcd
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix}
b5c95a0
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
b5c95a0
mv $RPM_BUILD_ROOT%{_bindir}/gfan_* $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
b5c95a0
pushd $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
b5c95a0
  for symlink in gfan_*; do
b5c95a0
    rm $symlink
b5c95a0
    ln -s ../../bin/%{name} $symlink
b5c95a0
  done
b5c95a0
popd
b5c95a0
b5c95a0
ec15435
# %%check
ec15435
# ./gfan _test
b5c95a0
b5c95a0
b5c95a0
%files
b5c95a0
%defattr(-,root,root,-)
b5c95a0
%doc COPYING examples LICENSE
b5c95a0
%{_bindir}/%{name}
b5c95a0
%{_libexecdir}/%{name}
b5c95a0
b5c95a0
b5c95a0
%changelog
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.