[SCM] Debian packaging for libntl - Number Theory Library branch, master, updated. 2d865f6b6a4085496252acddf42dd11d9050ff3f

Felix Salfelder salfelder at em.cs.uni-frankfurt.de
Wed Jan 25 12:20:48 UTC 2012


The following commit has been merged in the master branch:
commit 2d865f6b6a4085496252acddf42dd11d9050ff3f
Author: Felix Salfelder <salfelder at em.cs.uni-frankfurt.de>
Date:   Wed Jan 25 13:18:30 2012 +0100

    added static mach_desc (incomplete). copyright updated

diff --git a/debian/changelog b/debian/changelog
index 75a00d3..38a0e1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libntl (5.5.2-~pre1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  - debian/copyright
+  - integrated preliminary/incomplete static mach_desc (mostly Bernhards work)
+
+ -- Felix Salfelder <salfelder at em.cs.uni-frankfurt.de>  Wed, 11 Jan 2012 09:55:54 +0100
+
 libntl (5.5.2-~pre1) UNRELEASED; urgency=low
 
   * Preview version of this package.
diff --git a/debian/copyright b/debian/copyright
index 5ce031b..fbe8d3e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,13 +1,18 @@
-This package was debianized by Tim Abbott <tabbott at mit.edu> in 2008.
+This package was downloaded from http://www.shoup.net
 
-It was downloaded from http://www.shoup.net
+File: debian/*
+Author: Tim Abbott <tabbott at mit.edu> in 2008, some more (2008-12)
+License: GPL
 
-Upstream Author: Victor Shoup <victor at shoup.net>
+Files: src/quad_float.{c,h}
+License: GPL-2
+Author: (C) 1997 Keith Martin Briggs,  (C) 1997-2000  Victor Shoup
 
-Copyright (C) 1996-2007  Victor Shoup
-
-License:
+Files: *
+Author: Victor Shoup <victor at shoup.net>
+Copyright: (C) 1996-2007  Victor Shoup
 
+License: GPL-2
    This package is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
@@ -25,13 +30,3 @@ License:
 On Debian systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
 
-The files src/quad_float.c and src/quad_float.h contain some code with
-the following copyright:
-
-Copyright (C) 1997 Keith Martin Briggs
-	  (C) 1997-2000  Victor Shoup
-
-and are also licensed under the GPL, see above.
-
-The Debian packaging is (C) 2008, Tim Abbott <tabbott at mit.edu> and is
-licensed under the GPL, see above.
diff --git a/debian/patches/0002-mach_desc.patch b/debian/patches/0002-mach_desc.patch
new file mode 100644
index 0000000..635b195
--- /dev/null
+++ b/debian/patches/0002-mach_desc.patch
@@ -0,0 +1,114 @@
+--- /dev/null
++++ b/include/NTL/mach_desc_posix.h
+@@ -0,0 +1,84 @@
++#ifndef NTL_mach_desc_posix__H
++#define NTL_mach_desc_posix__H
++
++/* static variant of mach_desc.h */
++
++#include <limits.h>
++#include <stdint.h>
++
++#define NTL_MAX_LONG LONG_MAX
++#define NTL_MAX_INT INT_MAX
++#define NTL_MIN_LONG LONG_MIN
++#define NTL_MIN_INT INT_MIN
++
++/* guaranteed by posix, but be careful */
++#if INT_MAX == 2147483647
++#  define NTL_BITS_PER_INT (32)
++#else
++#  error Unexpected size of int.
++#endif
++
++#if LONG_MAX == (2147483647)
++#  define NTL_BITS_PER_LONG (32)
++#else
++# if LONG_MAX == (9223372036854775807L)
++#  define NTL_BITS_PER_LONG (64)
++# else
++#  error Could not determine size of long
++# endif
++#endif
++
++#ifdef SIZE_MAX
++// /usr/include/stdint.h
++# if SIZE_MAX == (4294967295U)
++#   define NTL_BITS_PER_SIZE_T (32)
++# else
++#  if SIZE_MAX == (18446744073709551615UL)
++#   define NTL_BITS_PER_SIZE_T (64)
++#  else
++#   error Could not determine size of size_t
++#  endif
++# endif
++#else
++# warning "possibly adventurous definition of NTL_BITS_PER_SIZE_T"
++# define NTL_BITS_PER_SIZE_T NTL_BITS_PER_LONG
++#endif
++
++/* this is IEEE standard */
++#define NTL_DOUBLE_PRECISION (53)
++
++#if NTL_BITS_PER_LONG == 32
++#define NTL_NBITS_MAX (30)
++#define NTL_FDOUBLE_PRECISION (((double)(1L<<30))*((double)(1L<<22)))
++#else
++#define NTL_NBITS_MAX (50)
++#define NTL_FDOUBLE_PRECISION (((double)(1L<<52)))
++#endif
++#define NTL_QUAD_FLOAT_SPLIT ((((double)(1L<<27)))+1.0)
++
++#ifdef __GNUC__
++#define NTL_ARITH_RIGHT_SHIFT (1)
++// http://gcc.gnu.org/ml/gcc/2000-04/msg00152.html
++// "For right shifts, if the type is signed, then we use an arithmetic shift; if
++// the type is unsigned then we use a logical."
++#else
++#define NTL_ARITH_RIGHT_SHIFT (1)
++// this looks quite waterproof, but any test of this sort is imcomplete, so why bother?
++//#define COMPILE_TIME_ASSERT(EXP) \
++//	    typedef int CompileTimeAssertType##__LINE__[(EXP) ? 1 : -1]
++//#define RIGHT_SHIFT_IS_ARITHMETIC  ( (((long)-1)>>1) == ((long)-1) )
++//COMPILE_TIME_ASSERT( RIGHT_SHIFT_IS_ARITHMETIC );
++# warning "unknown compiler -- please check manually."
++#endif
++
++#if (defined(__GNUC__) && (defined(__i386__) || defined(__i486__) || defined(__i586__)))
++#define NTL_EXT_DOUBLE (1)
++#else
++#define NTL_EXT_DOUBLE (0)
++#endif
++
++/* MakeDesc.c says those two are "fairly obsolete" and safe to set 0: */
++#define NTL_SINGLE_MUL_OK (0)
++#define NTL_DOUBLES_LOW_HIGH (0)
++
++#endif
+--- a/src/MakeDesc.c
++++ b/src/MakeDesc.c
+@@ -1071,6 +1071,8 @@
+ 
+    fprintf(f, "#ifndef NTL_mach_desc__H\n");
+    fprintf(f, "#define NTL_mach_desc__H\n\n\n");
++   fprintf(f, "#include \"mach_desc_posix.h\"\n");
++   fprintf(f, "#if 0\n");
+    fprintf(f, "#define NTL_BITS_PER_LONG (%ld)\n", bpl);
+    fprintf(f, "#define NTL_MAX_LONG (%ldL)\n", ((long) ((1UL<<(bpl-1))-1UL)));
+    fprintf(f, "#define NTL_MAX_INT (%ld)\n", ((long) ((1UL<<(bpi-1))-1UL)));
+@@ -1088,12 +1090,13 @@
+    fprintf(f, "#define NTL_EXT_DOUBLE (%d)\n", ((dp1 > dp) || dr));
+    fprintf(f, "#define NTL_SINGLE_MUL_OK (%d)\n", single_mul_ok != 0);
+    fprintf(f, "#define NTL_DOUBLES_LOW_HIGH (%d)\n\n\n", single_mul_ok < 0);
++   fprintf(f, "#endif\n");
+    print_BB_mul_code(f, bpl);
+    print_BB_sqr_code(f, bpl);
+    print_BB_rev_code(f, bpl);
+ 
+-   fprintf(f, "#define NTL_MIN_LONG (-NTL_MAX_LONG - 1L)\n");
+-   fprintf(f, "#define NTL_MIN_INT  (-NTL_MAX_INT - 1)\n");
++   fprintf(f, "// #define NTL_MIN_LONG (-NTL_MAX_LONG - 1L)\n");
++   fprintf(f, "// #define NTL_MIN_INT  (-NTL_MAX_INT - 1)\n");
+ 
+    fprintf(f, "#endif\n\n");
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 56b92cb..2996f55 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-gcc-4.5-mips.patch
+0002-mach_desc.patch
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..4aceb10
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1 @@
+unapply-patches

-- 
Debian packaging for libntl - Number Theory Library



More information about the debian-science-commits mailing list