064d365c33
- import patches from fedora to fix build with gcc 4.7 OBS-URL: https://build.opensuse.org/package/show/science/gfan?expand=0&rev=5
122 lines
3.5 KiB
RPMSpec
122 lines
3.5 KiB
RPMSpec
#
|
|
# spec file for package gfan
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: gfan
|
|
%define lname libgfan-0_5
|
|
Version: 0.5
|
|
Release: 0
|
|
Summary: Calculation of Gröbner fans
|
|
License: GPL-2.0
|
|
Group: Productivity/Scientific/Math
|
|
Url: http://home.imf.au.dk/jensen/software/gfan/gfan.html
|
|
|
|
Source: %name%version.tar.bz2
|
|
Patch0: gfan-automake.diff
|
|
# Sent upstream 2011 Apr 27. Respect DESTDIR
|
|
Patch1: gfan-respect-destdir.patch
|
|
# Sent upstream 2011 Apr 27. Fix 64-bit issues in printf statements by
|
|
# using %%zu instead of %%i for printing size_t values.
|
|
Patch2: gfan-format.patch
|
|
# Sent upstream 2011 Apr 27. Fix warnings that could indicate runtime
|
|
# problems.
|
|
Patch3: gfan-warning.patch
|
|
# Treate plain "gfan" call as "gfan_bases" call (as done in previous versions)
|
|
# instead of priting warning telling to call it as "gfan_bases" and exiting
|
|
Patch4: gfan-permissive.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: cddlib-devel
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gmp-devel
|
|
BuildRequires: libtool
|
|
%define with_pdf 1
|
|
%if 0%{?with_pdf}
|
|
BuildRequires: texlive-latex
|
|
%endif
|
|
|
|
%description
|
|
Gfan is a software package for computing Gröbner fans and tropical
|
|
varieties. These are polyhedral fans associated to polynomial ideals.
|
|
|
|
%package -n %lname
|
|
Summary: Library for calculation of Gröbner fans
|
|
Group: System/Libraries
|
|
|
|
%description -n %lname
|
|
Gfan is a software package for computing Gröbner fans and tropical
|
|
varieties. These are polyhedral fans associated to polynomial ideals.
|
|
|
|
%package -n libgfan-devel
|
|
Summary: Development files for libgfan
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %lname = %version
|
|
|
|
%description -n libgfan-devel
|
|
Gfan is a software package for computing Gröbner fans and tropical
|
|
varieties. These are polyhedral fans associated to polynomial ideals.
|
|
|
|
%prep
|
|
%setup -q -n %{name}%{version}
|
|
%patch0 -p1
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4 -p1
|
|
|
|
# Point to where the TOPCOM binaries will be installed
|
|
sed -i \
|
|
"s|^#define MINKOWSKIPROG.*|#define MINKOWSKIPROGRAM \"%{_bindir}/essai\"|" \
|
|
minkowskisum.cpp
|
|
|
|
%build
|
|
autoreconf -fi;
|
|
%if 0%{?suse_version} <= 1110
|
|
# -Wno-unused-result is not a recognized option of gcc 4.3
|
|
export CXXFLAGS="%optflags -Wno-sign-compare -Wno-reorder -Wno-unused";
|
|
%else
|
|
export CXXFLAGS="%optflags -Wno-sign-compare -Wno-reorder -Wno-unused -Wno-unused-result";
|
|
%endif
|
|
%configure --disable-static
|
|
make %{?_smp_mflags};
|
|
%if 0%{?with_pdf}
|
|
make -C doc %{?_smp_mflags};
|
|
%endif
|
|
|
|
%install
|
|
b="%buildroot";
|
|
%makeinstall
|
|
find "$b" -type f -name "*.la" -delete;
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%_bindir/gfan
|
|
%doc examples
|
|
%if 0%{?with_pdf}
|
|
%doc doc/manual.pdf
|
|
%endif
|
|
|
|
%files -n %lname
|
|
%defattr(-,root,root)
|
|
%_libdir/libgfan-%version.so
|
|
|
|
%files -n libgfan-devel
|
|
%defattr(-,root,root)
|
|
%_libdir/libgfan.so
|
|
%_includedir/*
|
|
|
|
%changelog
|