[libscs] Initial package
Tim Niemueller
timn at fedoraproject.org
Mon Feb 21 20:59:24 UTC 2011
commit 503fd0d0675985e348ded9e8f47e02f1ba76c1e6
Author: Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date: Mon Feb 21 21:59:13 2011 +0100
Initial package
.gitignore | 1 +
libscs.spec | 107 +++++++++++++++++++++++++++++++++++++++++++++
scslib-1.4.1-shared.patch | 76 ++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 185 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..29a1091 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/scslib-1.4.1.tar.gz
diff --git a/libscs.spec b/libscs.spec
new file mode 100644
index 0000000..91c8801
--- /dev/null
+++ b/libscs.spec
@@ -0,0 +1,107 @@
+Name: libscs
+Version: 1.4.1
+Release: 3%{?dist}
+Summary: Software Carry-Save Multiple-Precision Library
+
+Group: System Environment/Libraries
+License: LGPLv2+
+URL: http://www.ens-lyon.fr/LIP/Arenaire/Ware/SCSLib/
+Source0: http://www.ens-lyon.fr/LIP/Arenaire/Ware/SCSLib/scslib-%{version}.tar.gz
+Patch0: scslib-1.4.1-shared.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: autoconf, automake, libtool
+BuildRequires: mpfr-devel, gmp-devel
+
+%description
+The Software Carry-Save (SCS) Library is a fast and lightweight
+multiple-precision library.
+
+SCSLib has the following features:
+
+- Multiple-precision
+SCSLib is a fixed-precision library, where precision is selected at
+compile-time. Out-of-the-box, the library ensures 210 bits of precision
+(quad-double).
+
+- Floating-point format
+The SCS format is a floating-point format where exponents are machine integers
+(usually 32-bit numbers), which ensures a huge exponent range.
+
+- Supported operations
+SCSLib currently offers addition/subtraction, multiplication, and an
+experimental division, plus all the useful conversion functions.
+
+- IEEE-754 compatibility
+The range of SCS numbers includes the range of IEEE double-precision numbers,
+including denormals and exceptional cases. Conversions between SCS format and
+IEEE-754 doubles, as well as arithmetic operations, follow the IEEE rules
+concerning the exceptional cases. SCS doesn't ensure correct rounding, but
+provides conversions to doubles in the four IEEE-754 rounding modes.
+
+- Performance
+SCSLib is designed to be fast. With 210 bits, it outperforms MPF for most
+operations on most architectures.
+
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: mpfr-devel, gmp-devel
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+
+%prep
+%setup -q -n scslib-%{version}
+%patch0 -p1 -b .shared
+
+
+%build
+# autoreconf required because the patch modifies autoconf files
+autoreconf --install --force
+%configure --disable-static --enable-mpfr --enable-gmp
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING AUTHORS
+%{_libdir}/*.so.*
+%{_bindir}/*
+
+%files devel
+%defattr(-,root,root,-)
+%doc DocsDev/html/*
+%{_includedir}/*
+%{_libdir}/*.so
+
+
+%changelog
+* Sun Feb 20 2011 Tim Niemueller <tim at niemueller.de> - 1.4.1-3
+- Make -devel subpackage depend on mpfr-devel and gmp-devel
+
+* Sat Feb 19 2011 Tim Niemueller <tim at niemueller.de> - 1.4.1-2
+- Fix typo in configure flags (mpfs -> mpfr)
+
+* Sat Feb 19 2011 Tim Niemueller <tim at niemueller.de> - 1.4.1-1
+- Initial package
+
diff --git a/scslib-1.4.1-shared.patch b/scslib-1.4.1-shared.patch
new file mode 100644
index 0000000..f2f9101
--- /dev/null
+++ b/scslib-1.4.1-shared.patch
@@ -0,0 +1,76 @@
+diff -urN scslib-1.4.1/configure.in scslib-1.4.1.shared/configure.in
+--- scslib-1.4.1/configure.in 2003-05-05 11:54:03.000000000 +0200
++++ scslib-1.4.1.shared/configure.in 2011-02-19 14:46:42.504939624 +0100
+@@ -40,6 +40,7 @@
+ AC_PROG_CXX
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
++AC_PROG_LIBTOOL
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+diff -urN scslib-1.4.1/Makefile.am scslib-1.4.1.shared/Makefile.am
+--- scslib-1.4.1/Makefile.am 2003-05-28 17:57:25.000000000 +0200
++++ scslib-1.4.1.shared/Makefile.am 2011-02-19 14:47:21.120790899 +0100
+@@ -1,13 +1,13 @@
+ ## Process this file with automake to produce Makefile.in
+
+
+-lib_LIBRARIES = libscs.a
++lib_LTLIBRARIES = libscs.la
+
+
+ # shared libraries need libtool. We'll do it later.
+ #lib_LTLIBRARIES = libscs.la
+
+-libscs_a_SOURCES = scs.h scs_private.h \
++libscs_la_SOURCES = scs.h scs_private.h \
+ double2scs.c print_scs.c \
+ addition_scs.c multiplication_scs.c division_scs.c\
+ rand_scs.c poly_fct.c\
+diff -urN scslib-1.4.1/tests/Makefile.am scslib-1.4.1.shared/tests/Makefile.am
+--- scslib-1.4.1/tests/Makefile.am 2003-05-05 11:54:03.000000000 +0200
++++ scslib-1.4.1.shared/tests/Makefile.am 2011-02-19 15:40:07.320022570 +0100
+@@ -2,12 +2,13 @@
+
+ bin_PROGRAMS = scs_test_timing scs_test_accuracy
+
+-LDADD= $(top_builddir)/libscs.a
++LDADD= $(top_builddir)/libscs.la
+ INCLUDES=-I$(top_srcdir)
+
+-../libscs.a:
+- cd $(top_srcdir); make libscs.a
++../libscs.la:
++ cd $(top_srcdir); make libscs.la
+
+ scs_test_timing_SOURCES = test_timing.c tbx_timing.h
+
+-scs_test_accuracy_SOURCES = test_accuracy.c
+\ Kein Zeilenumbruch am Dateiende.
++scs_test_accuracy_SOURCES = test_accuracy.c
++scs_test_accuracy_LDFLAGS = -lmpfr
+diff -urN scslib-1.4.1/tests/test_accuracy.c scslib-1.4.1.shared/tests/test_accuracy.c
+--- scslib-1.4.1/tests/test_accuracy.c 2003-06-16 15:49:42.000000000 +0200
++++ scslib-1.4.1.shared/tests/test_accuracy.c 2011-02-19 15:52:38.436293776 +0100
+@@ -25,9 +25,9 @@
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ */
++#include <stdio.h>
+ #include "scs.h"
+ #include "scs_private.h"
+-#include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+
+@@ -37,6 +37,9 @@
+
+ #include <mpfr.h>
+
++#ifndef _GMP_H_HAVE_FILE
++# error mpfr_out_str not available
++#endif
+
+ void (* test_scs_fct) () = NULL;
+ int (* test_mpfr_fct) () = NULL;
diff --git a/sources b/sources
index e69de29..cf6d374 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3cd71394f1e482e73f0b377c8ca239de scslib-1.4.1.tar.gz
More information about the scm-commits
mailing list