Blob Blame History Raw
Name:		givaro
Version:	3.8.0
Release:	3%{?dist}
Summary:	C++ library for arithmetic and algebraic computations
Group:		Development/Libraries

License:	CeCILL-B
URL:		http://ljk.imag.fr/CASYS/LOGICIELS/givaro/
Source0:	https://forge.imag.fr/frs/download.php/592/%{name}-%{version}.tar.gz
# Avoid a spurious newline when configuring with both --cflags and --libs
Patch0:		givaro-config-script.patch

BuildRequires:	doxygen
BuildRequires:  ghostscript
BuildRequires:	gmp-devel
BuildRequires:	tex(latex)
BuildRequires:  tex(stmaryrd.sty)


%description
Givaro is a C++ library for arithmetic and algebraic computations.
Its main features are implementations of the basic arithmetic of many
mathematical entities: Primes fields, Extensions Fields, Finite Fields,
Finite Rings, Polynomials, Algebraic numbers, Arbitrary precision
integers and rationals (C++ wrappers over gmp) It also provides
data-structures and templated classes for the manipulation of basic
algebraic objects, such as vectors, matrices (dense, sparse, structured),
univariate polynomials (and therefore recursive multivariate).


%package        devel
Summary:	Files useful for %{name} development
Group:		Development/Libraries
Requires:	%{name}%{?_isa} = %{version}-%{release}
Provides:	bundled(jquery)


%description    devel
The libraries and header files for using %{name} for development.


%package        static
Summary:	Files used for static linking with %{name}
Group:		Development/Libraries
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	%{name}-devel%{?_isa} = %{version}-%{release}


%description    static
The static libraries for using %{name} for development.


%prep
%setup -q
%patch0

# Fix file encodings
for i in Licence_CeCILL-B_V1-fr.txt Licence_CeCILL-B_V1-en.txt COPYING AUTHORS;
do
	iconv -f iso8859-1 -t utf-8 $i > $i.new
	touch -r $i $i.new
	mv $i.new $i
done

# Remove unnecessary executable bits
find examples -name Makefile.am -perm /0111 | xargs chmod a-x

%build
%configure --enable-doc --docdir=%{_docdir}/%{name}-devel \
  CPPFLAGS="-D__int64=__int64_t"

# Get rid of undesirable hardcoded rpaths, and workaround libtool reordering
# -Wl,--as-needed after all the libraries.
sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
    -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
    -e 's|CC="\(g..\)"|CC="\1 -Wl,--as-needed"|' \
    -i libtool

make %{?_smp_mflags}

# We don't want these files with the doxygen-generated files
rm -f docs/givaro-html/{AUTHORS,COPYING,INSTALL}


%install
# Documentation installation is hopelessly broken
sed -i 's/^SUBDIRS =.*/SUBDIRS = src macros tests/' Makefile

make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la

#givaro-makefile is installed incorrectly in usr/bin
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mv $RPM_BUILD_ROOT/%{_bindir}/givaro-makefile $RPM_BUILD_ROOT%{_datadir}/%{name}
chmod 644  $RPM_BUILD_ROOT%{_datadir}/%{name}/givaro-makefile
sed -i '\%#! /bin/sh%D' $RPM_BUILD_ROOT%{_datadir}/%{name}/givaro-makefile


%check
make check


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%doc AUTHORS
%license COPYRIGHT COPYING Licence_CeCILL-B_V1-en.txt Licence_CeCILL-B_V1-fr.txt
%{_libdir}/lib%{name}.so.*


%files devel
%doc docs/givaro-html docs/givaro-dev-html examples
%{_bindir}/%{name}-config
%{_includedir}/%{name}/
%{_includedir}/gmp++/
%{_datadir}/%{name}/
%{_includedir}/%{name}-config.h
%{_libdir}/lib%{name}.so


%files static
%{_libdir}/lib%{name}.a


%changelog
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.8.0-3
- Rebuilt for GCC 5 C++11 ABI change

* Mon Feb 16 2015 Jerry James <loganjerry@gmail.com> - 3.8.0-2
- Note bundled jquery

* Tue Oct 28 2014 Jerry James <loganjerry@gmail.com> - 3.8.0-1
- New upstream release
- Fix license handling

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb  8 2013 Jerry James <loganjerry@gmail.com> - 3.7.2-1
- New upstream release
- Add BRs for TeXLive 2012
- Make sure the library doesn't have an rpath
- Link with --as-needed
- Add AUTHORS and COPYING to doc

* Wed Sep 26 2012 Jerry James <loganjerry@gmail.com> - 3.7.1-1
- New upstream release

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jul 3 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 3.7.0-1
- Update to latest upstream release.
- Remove gcc 4.7 patch already applied to upstream tarball.

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-3
- Rebuilt for c++ ABI breakage

* Mon Jan  9 2012 Jerry James <loganjerry@gmail.com> - 3.5.0-2
- Rebuild for GCC 4.7

* Tue Nov  1 2011 Jerry James <loganjerry@gmail.com> - 3.5.0-1
- Update to 3.5.0

* Fri Oct 21 2011 Marcela Mašláňová <mmaslano@redhat.com> - 3.4.2-1.2
- rebuild with new gmp without compat lib

* Tue Oct 11 2011 Peter Schiffer <pschiffe@redhat.com> - 3.4.2-1.1
- rebuild with new gmp

* Tue Jul  5 2011 Jerry James <loganjerry@gmail.com> - 3.4.2-1
- Update to 3.4.2
- Add doxygen documentation and examples to docs

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan 02 2010 D Haley <mycae(a!t)yahoo.com> - 3.3.1-1
- Update to 3.3.1

* Fri Oct 09 2009 D Haley <mycae(a!t)yahoo.com> - 3.3.0-1
- Update to 3.3.0
- Relicence per CeCILL-B

* Sat Sep 12 2009 D Haley <mycae(a!t)yahoo.com> - 3.2.15-0.2.rc1
- Change to GPL+ from GPL2 per bugzilla comment

* Sun Aug 23 2009 D Haley <mycae(a!t)yahoo.com> - 3.2.15-0.1.rc1
- Upgrade to 3.2.15rc1
- Modify givaro-config.in to allow multiple flags simultaneously

* Sat Dec 6 2008 Conrad Meyer <konrad@tylerc.org> - 3.2.13-2
- Fix endian header to be non-endian.

* Sat Dec 6 2008 Conrad Meyer <konrad@tylerc.org> - 3.2.13-1
- Initial package.