New upstream version.

This commit is contained in:
Jerry James 2015-09-19 20:56:40 -06:00
parent 79ac1b5ca7
commit d77ef57bb1
4 changed files with 13 additions and 64 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/ntl-8.1.2.tar.gz
/ntl-9.1.0.tar.gz
/ntl-9.1.1.tar.gz
/ntl-9.3.0.tar.gz

View File

@ -1,52 +0,0 @@
--- ./include/NTL/tools.h.orig 2015-05-02 05:33:11.000000000 -0600
+++ ./include/NTL/tools.h 2015-05-02 16:21:34.715795969 -0600
@@ -523,7 +523,12 @@ void swap(WrappedPtr<T,Deleter>& x, Wrap
// Error Handling
-
+/*
+ This function is not present in vanilla NTL.
+ See tools.c for documentation.
+ */
+void SetErrorCallbackFunction(void (*func)(const char *s, void *context),
+ void *context);
class ErrorObject : public NTL_SNS runtime_error {
public:
--- ./src/tools.c.orig 2015-05-02 05:33:10.000000000 -0600
+++ ./src/tools.c 2015-05-02 16:21:34.716795889 -0600
@@ -17,9 +17,33 @@ NTL_START_IMPL
NTL_THREAD_LOCAL void (*ErrorCallback)() = 0;
+/*
+ The following code differs from vanilla NTL.
+
+ We add a SetErrorCallbackFunction(). This sets a global callback function
+ _function_, which gets called with parameter _context_ and an error
+ message string whenever Error() gets called.
+
+ Note that if the custom error handler *returns*, then NTL will dump the
+ error message back to stderr and abort() as it habitually does.
+
+ -- David Harvey (2008-04-12)
+*/
+
+void (*ErrorCallbackFunction)(const char*, void*) = NULL;
+void *ErrorCallbackContext = NULL;
+
+void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context)
+{
+ ErrorCallbackFunction = function;
+ ErrorCallbackContext = context;
+}
void TerminalError(const char *s)
{
+ if (ErrorCallbackFunction != NULL)
+ ErrorCallbackFunction(s, ErrorCallbackContext);
+
cerr << s << "\n";
_ntl_abort();
}

View File

@ -4,16 +4,14 @@
# define include static lib (else undef)
#define static 1
# no gf2x in rhel/epel, yet -- rex
# gf2x in rhel/epel 7 -- marianne
%if 0%{?fedora} || 0%{?rhel} >= 7
%define gf2x 1
%global gf2x 1
%endif
Summary: High-performance algorithms for vectors, matrices, and polynomials
Name: ntl
Version: 9.1.1
Release: 2%{?dist}
Version: 9.3.0
Release: 1%{?dist}
License: GPLv2+
URL: http://shoup.net/ntl/
@ -22,9 +20,6 @@ Group: System Environment/Libraries
Source0: http://shoup.net/ntl/%{name}-%{version}.tar.gz
Source1: multilib_template.h
# Apply sagemath patch to let sagemath handle NTL errors.
Patch0: %{name}-sagemath.patch
%if 0%{?gf2x}
BuildRequires: gf2x-devel
%endif
@ -67,7 +62,6 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%prep
%setup -q
%patch0
%build
@ -76,7 +70,7 @@ pushd src
CXX="${CXX-g++}" \
CXXFLAGS="%{optflags} -fPIC" \
LDFLAGS="$RPM_LD_FLAGS" \
PREFIX=%{_prefix} \
DEF_PREFIX=%{_prefix} \
DOCDIR=%{_docdir} \
INCLUDEDIR=%{_includedir} \
LIBDIR=%{_libdir} \
@ -102,6 +96,9 @@ make -C src install \
INCLUDEDIR=%{buildroot}%{_includedir} \
LIBDIR=%{buildroot}%{_libdir}
# Fix permissions
chmod 0755 %{buildroot}%{_libdir}/libntl.so.*
# Unpackaged files
rm -rfv %{buildroot}%{_docdir}/NTL
rm -fv %{buildroot}%{_libdir}/libntl.la
@ -129,7 +126,7 @@ done
%files
%doc README
%license doc/copying.txt
%{_libdir}/libntl.so.14*
%{_libdir}/libntl.so.16*
%files devel
%doc doc/*
@ -143,6 +140,9 @@ done
%changelog
* Sat Sep 19 2015 Jerry James <loganjerry@gmail.com> - 9.3.0-1
- ntl-9.3.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 9.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
22beee5ee1fe7c09f623d0f0cf08e7af ntl-9.1.1.tar.gz
e55dd4fcb3a6b4901776239ccffb2300 ntl-9.3.0.tar.gz