%{?optflags_lto:%global optflags_lto %optflags_lto -ffat-lto-objects}

Name:     libgaol
Version:  4.2.3
Release:  alt1
Summary:  An interval arithmetic C++ library
License:  LGPL-2
Group:    Sciences/Mathematics
Url:      https://github.com/goualard-f/GAOL
Packager: Alexander Lubyagin <dfpl@altlinux.org>
# https://frederic.goualard.net/#research-software-gaol
# https://sourceforge.net/projects/gaol/files/gaol/4.2.0/
Source:   %name-%version.tar

BuildRequires: cmake gcc-c++ gcc-c++-common
BuildRequires: libstdc++-devel libapmathlib-devel
BuildRequires: libstdc++-devel-static libapmathlib-devel-static
BuildRequires: doxygen

%description
Gaol is a C++ library that offers an "interval" data type 
to perform interval arithmetic. Its specificity is to implement
also "relational" interval arithmetic as needed by interval constraint
solvers. See also:
- Interval Analysis, Ramon E. Moore, Prentice Hall, 1966;
- Introduction to Numerical Analysis, Arnold Neumaier,
  Cambridge Univ. Press, 2001;
- Interval Computation Homepage:
  http://www.cs.utep.edu/interval-comp/main.html
- Logical Arithmetic, John G. Cleary,  Future Generation Computing
  Systems 2(2):125-149.

%package devel
Summary: Development environment for libgaol
Group: Development/C
Requires: %name = %version-%release

%description devel
Libgoal is an interval arithmetic C++ library.
This package contains development files you can use to develop
applications using arbitrary-precision computations.

%package devel-static
Summary: Static libgaol library
Group: Development/C
Requires: %name-devel = %version-%release

%description devel-static
Libgoal is an interval arithmetic C++ library.
This package contains development files you can use to develop
statically linked applications using arbitrary-precision computations.

%prep
%setup -q

%build
%configure --with-mathlib=apmathlib LIBS="-lultim" --enable-optimize
make 

%install
%makeinstall

%files
%doc AUTHORS BUGS README TODO NEWS COPYING.LIB ChangeLog doc/gaol.pdf
%_libdir/libgaol-*.so.*

%files devel
%_libdir/*.so
%_includedir/gaol/gaol
%_includedir/gaol/*.h
%_includedir/gaol/sysdeps/*.h

%files devel-static
%_libdir/*.a

%changelog
* Mon Jul 29 2024 Alexander Lubyagin <dfpl@altlinux.org> 4.2.3-alt1
- 4.2.3
* Fri Jul 15 2005 Frederic Goualard <Frederic.Goualard@univ-nantes.fr>
- modified %post and %postun rules
* Thu Oct 14 2004 Frederic Goualard <Frederic.Goualard@lina.univ-nantes.fr>
- changed the Vendor from IRIN to LINA
* Mon Aug 12 2002 Frederic Goualard <Frederic.Goualard@irin.univ-nantes.fr>
- initial build
