[Singular] 3.1.3-8
Rex Dieter
rdieter at fedoraproject.org
Thu Jul 19 23:40:15 UTC 2012
commit 861322627a0215ca38bd0c07ac31acd48cb4c578
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Jul 19 18:43:37 2012 -0500
3.1.3-8
- macaulay2 patches for libfac/factory
- omit duplicate %description sections
Singular-M2_factory.patch | 71 +++++++++++++++++++++++++++
Singular-M2_libfac.patch | 9 ++++
Singular-M2_memutil_debuggging.patch | 88 ++++++++++++++++++++++++++++++++++
Singular.spec | 31 +++++++-----
4 files changed, 186 insertions(+), 13 deletions(-)
---
diff --git a/Singular-M2_factory.patch b/Singular-M2_factory.patch
new file mode 100644
index 0000000..a849686
--- /dev/null
+++ b/Singular-M2_factory.patch
@@ -0,0 +1,71 @@
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/assert.h factory-3-1-3/assert.h
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/assert.h 2009-11-02 11:12:22.000000000 +0100
++++ factory-3-1-3/assert.h 2011-09-21 10:26:14.000000000 +0200
+@@ -5,6 +5,9 @@
+ #if defined (NDEBUG) && ! defined (NOASSERT)
+ #define NOASSERT
+ #endif
++
++/* need a declaration of "abort" */
++#include <stdlib.h>
+
+ /* It should be possible to include this file multiple times for different */
+ /* settings of NOASSERT */
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/cf_cyclo.cc factory-3-1-3/cf_cyclo.cc
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/cf_cyclo.cc 2010-11-15 16:34:57.000000000 +0100
++++ factory-3-1-3/cf_cyclo.cc 2011-09-21 10:22:45.000000000 +0200
+@@ -83,7 +83,7 @@
+ }
+ if (j >= 31397)
+ fail= true;
+- ASSERT (j < 31397, "integer factorizer ran out of primes") //sic
++ ASSERT (j < 31397, "integer factorizer ran out of primes"); //sic
+ return result;
+ }
+
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/cf_gcd_smallp.h factory-3-1-3/cf_gcd_smallp.h
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/cf_gcd_smallp.h 2010-11-22 11:12:46.000000000 +0100
++++ factory-3-1-3/cf_gcd_smallp.h 2011-09-21 10:29:36.000000000 +0200
+@@ -24,6 +24,7 @@
+
+ #include <config.h>
+ #include "assert.h"
++#include <factory/cf_factory.h>
+
+ CanonicalForm GCD_Fp_extension (const CanonicalForm& F, const CanonicalForm& G,
+ Variable & alpha, CFList& l, bool& top_level);
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/facFqSquarefree.h factory-3-1-3/facFqSquarefree.h
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/facFqSquarefree.h 2010-11-15 16:34:57.000000000 +0100
++++ factory-3-1-3/facFqSquarefree.h 2011-09-21 10:23:54.000000000 +0200
+@@ -17,7 +17,7 @@
+ #define FAC_FQ_SQUAREFREE_H
+
+ #include "assert.h"
+-
++#include <factory/cf_factory.h>
+
+ /// squarefree factorization over a finite field
+ /// @a return a list of squarefree factors with multiplicity
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/gfops.cc factory-3-1-3/gfops.cc
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/gfops.cc 2009-11-02 11:12:22.000000000 +0100
++++ factory-3-1-3/gfops.cc 2011-09-21 10:30:53.000000000 +0200
+@@ -183,7 +183,7 @@
+
+ void gf_setcharacteristic ( int p, int n, char name )
+ {
+- ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
++ //ASSERT( gf_valid_combination( p, n ), "illegal immediate GF(q)" );
+ gf_name = name;
+ gf_get_table( p, n );
+ }
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/factory/tmp/factory-3-1-3/variable.cc 2010-11-15 16:34:57.000000000 +0100
++++ factory-3-1-3/variable.cc 2011-09-21 10:31:15.000000000 +0200
+@@ -169,7 +169,7 @@
+
+ Variable rootOf( const CanonicalForm & mipo, char name )
+ {
+- ASSERT( legal_mipo( mipo ), "not a legal extension" );
++ //ASSERT( legal_mipo( mipo ), "not a legal extension" );
+
+ int l;
+ if ( var_names_ext == 0 ) {
diff --git a/Singular-M2_libfac.patch b/Singular-M2_libfac.patch
new file mode 100644
index 0000000..9a9c322
--- /dev/null
+++ b/Singular-M2_libfac.patch
@@ -0,0 +1,9 @@
+diff -ur /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/libfac/tmp/libfac-3-1-3/factor/tmpl_inst.cc libfac-3-1-3/factor/tmpl_inst.cc
+--- /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.debug/libraries/libfac/tmp/libfac-3-1-3/factor/tmpl_inst.cc 2010-06-24 17:05:34.000000000 +0200
++++ libfac-3-1-3/factor/tmpl_inst.cc 2011-09-22 00:46:26.000000000 +0200
+@@ -91,3 +91,5 @@
+ template class List<CFFList>;
+ template class ListIterator<CFFList>;
+ #endif /* HAVE_DATABASE */
++
++template bool find<CanonicalForm>(List<CanonicalForm> const&, CanonicalForm const&);
diff --git a/Singular-M2_memutil_debuggging.patch b/Singular-M2_memutil_debuggging.patch
new file mode 100644
index 0000000..075e415
--- /dev/null
+++ b/Singular-M2_memutil_debuggging.patch
@@ -0,0 +1,88 @@
+--- memutil.c 2008-10-24 09:31:38.000000000 -0500
++++ memutil-debug.c 2008-10-24 09:31:58.000000000 -0500
+@@ -18,6 +18,10 @@
+
+ static listentry * blocklist[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
+
++#define EXTRA 4
++#define MAGIC 0xbeefbeef
++#define DEAD 0xdeaddead
++
+ #define GETBLOCK( list, size ) { \
+ if ( blocklist[list] ) { \
+ listentry* retval = blocklist[list]; \
+@@ -26,32 +30,34 @@
+ } \
+ else { \
+ char* retval = (char*)malloc( size ); \
+- *((int*)retval) = size-4; \
+- retval += 4; \
++ *((int*)retval) = size-4-EXTRA; \
++ *((int*)retval+1) = MAGIC; \
++ retval += 4+EXTRA; \
+ return (void*)retval; \
+ } \
+ }
+
+ void* getBlock ( size_t size )
+ {
+- if ( size <= 4 )
++ if ( size <= 4 - EXTRA )
+ GETBLOCK( 0, 8 )
+- else if ( size <= 12 )
++ else if ( size <= 12 - EXTRA )
+ GETBLOCK( 1, 16 )
+- else if ( size <= 28 )
++ else if ( size <= 28 - EXTRA )
+ GETBLOCK( 2, 32 )
+- else if ( size <= 60 )
++ else if ( size <= 60 - EXTRA )
+ GETBLOCK( 3, 64 )
+- else if ( size <= 124 )
++ else if ( size <= 124 - EXTRA )
+ GETBLOCK( 4, 128 )
+- else if ( size <= 252 )
++ else if ( size <= 252 - EXTRA )
+ GETBLOCK( 5, 256 )
+- else if ( size <= 508 )
++ else if ( size <= 508 - EXTRA )
+ GETBLOCK( 6, 512 )
+ else {
+- char* retval = (char*)malloc( size+4 );
++ char* retval = (char*)malloc( size+4+EXTRA );
+ *((int*)retval) = size;
+- retval += 4;
++ *((int*)retval+1) = MAGIC;
++ retval += 4+EXTRA;
+ return retval;
+ }
+ }
+@@ -62,12 +68,14 @@
+ blocklist[list] = dummy; \
+ }
+
+-void freeBlock ( void* block, size_t size )
++void freeBlock ( void* block, size_t size0 )
+ {
+ char* dummy = (char*)block;
+ if ( block == NULL ) return;
+- dummy -= 4;
+- size = *((int*)dummy);
++ dummy -= 4+EXTRA;
++ int magic = *((int*)dummy+1);
++ ASSERT( magic == MAGIC , "freeBlock: wrong magic number" );
++ int size = *((int*)dummy);
+ if ( size == 4 )
+ FREEBLOCK( 0, block )
+ else if ( size == 12 )
+@@ -90,7 +98,9 @@
+ {
+ void * dummy;
+ #if 1
+- char* dum = (char*)block - 4;
++ char* dum = (char*)block - 4 - EXTRA;
++ int magic = *((int*)dum+1);
++ ASSERT( magic == MAGIC , "reallocBlock: wrong magic number" );
+ int size = *((int*)dum);
+ if (newsize <= size) return block;
+ #endif
diff --git a/Singular.spec b/Singular.spec
index b501b7b..b757d7b 100644
--- a/Singular.spec
+++ b/Singular.spec
@@ -2,7 +2,7 @@
Name: Singular
Version: 3.1.3
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Computer Algebra System for polynomial computations
Group: Applications/Engineering
License: BSD and LGPLv2+ and GPLv2+
@@ -44,6 +44,11 @@ Patch7: Singular-builddid.patch
# a shared library.
Patch8: Singular-undefined.patch
+## Macaulay2 patches
+Patch20: Singular-M2_factory.patch
+Patch21: Singular-M2_memutil_debuggging.patch
+Patch22: Singular-M2_libfac.patch
+
%description
Singular is a computer algebra system for polynomial computations, with
special emphasis on commutative and non-commutative algebra, algebraic
@@ -60,9 +65,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains the Singular development files.
-%description devel
-This package contains the Singular development files.
-
%package -n factory-devel
Summary: C++ class library for multivariate polynomial data
Group: Development/Libraries
@@ -95,9 +97,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description examples
This package contains the Singular example files.
-%description examples
-This package contains the Singular example files.
-
%package doc
Summary: Singular documentation files
Group: Applications/Engineering
@@ -106,9 +105,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description doc
This package contains the Singular documentation files.
-%description doc
-This package contains the Singular documentation files.
-
%package surfex
Summary: Singular java interface
Group: Applications/Engineering
@@ -118,9 +114,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description surfex
This package contains the Singular java interface.
-%description surfex
-This package contains the Singular java interface.
-
%package emacs
Summary: Emacs mode for Singular
Group: Applications/Engineering
@@ -142,6 +135,14 @@ Emacs mode for Singular.
%patch7 -p1
%patch8 -p1
+pushd factory
+%patch20 -p1 -b .M2_factory
+%patch21 -p0 -b .M2_memutil_debuggging
+popd
+pushd libfac
+%patch22 -p1 -b .M2_libfac
+popd
+
sed -i -e "s|gftabledir=.*|gftabledir='%{singulardir}/LIB/gftables'|" \
-e "s|explicit_gftabledir=.*|explicit_gftabledir='%{singulardir}/LIB/gftables'|" \
factory/configure.in
@@ -396,6 +397,10 @@ popd
%{_emacs_sitestartdir}/singular-init.el
%changelog
+* Thu Jul 19 2012 Rex Dieter <rdieter at fedoraproject.org> - 3.1.3-8
+- macaulay2 patches for libfac/factory
+- omit duplicate %%description sections
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list