gap-float/gap-float.spec

82 lines
2.9 KiB
RPMSpec

#
# spec file for package gap-float
#
# Copyright (c) 2013 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: gap-float
Summary: GAP: Integration of mpfr, mpfi, mpc, fplll and cxsc in GAP
Version: 0.5.18
Release: 0
License: GPL-3.0+
Group: Productivity/Scientific/Math
Url: http://laurentbartholdi.github.com/float/
#Git-Clone: git://github.com/laurentbartholdi/float/
Source: ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages/Float-%version.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cxsc-devel
BuildRequires: gap-devel >= 4.7
BuildRequires: gap-rpm-devel
BuildRequires: gcc-c++
BuildRequires: libfplll-devel
BuildRequires: libtool
BuildRequires: mpc-devel
BuildRequires: mpfi-devel
BuildRequires: mpfr-devel
Requires: gap-core >= 4.7
Requires: gap-gapdoc >= 1.0
%description
The Float package allows GAP to manipulate floating-point numbers
with arbitrary precision. It is based on MPFR, MPFI, MPC, CXSC,
FPLLL.
%prep
%setup -qn float-%version
%build
# autoconf needs to be rerun, because upstream failed to do so after
# applying changes to configure.in
#
# configure:17420: checking for lllReduction in -lfplll
# configure:17433: g++ -o conftest -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include -L/usr/lib -lfplll -lgmp conftest.cpp >&5
# /tmp/ccbQMiJi.o: In function `~Z_NR':
# /usr/include/fplll/nr.cpp:485: undefined reference to `__gmpz_clear'
#
# The correct line after autoconf is:
# configure:17464: g++ -o conftest -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include -L/usr/lib conftest.cpp -lfplll -lgmp >&5
pushd cnf/
autoconf
cp configure ..
popd
%configure --with-gaproot="%gapdir" --with-cxsc-include="%_includedir/cxsc" \
--with-fplll="%_prefix";
make %{?_smp_mflags}
%install
rm -Rf bin/*/.libs
find bin -type f ! -name float.so -delete
%gappkg_simple_install
rm -Rf "%buildroot/$moddir"/{cnf,configu*,src}
%files -f %name.files
%defattr(-,root,root)
%changelog