--- flint-1.011.orig/debian/changelog +++ flint-1.011/debian/changelog @@ -0,0 +1,42 @@ +flint (1.011-2.2) unstable; urgency=low + + * NMU: apply patch for build problem on mips (Closes: #665719) + (patch from Dejan Latinovic) + + -- Thorsten Alteholz Mon, 11 Nov 2013 18:43:41 +0100 + +flint (1.011-2.1) unstable; urgency=low + + * NMU: Fix the inline ASM for ARM to specify .arm mode, so it works + correctly when compiling with -mthumb-interwork (Closes: #652205) + + -- Adam Conrad Mon, 25 Jun 2012 18:43:41 -0600 + +flint (1.011-2) unstable; urgency=low + + * Add a prototype for __gmpn_udiv_w_sdiv when it is needed + (Closes: #499877). + + -- Tim Abbott Tue, 23 Sep 2008 21:13:54 -0400 + +flint (1.011-1) unstable; urgency=low + + * New upstream release. + * Update Standards-Version to 3.8.0. + * Enable the new NTL interface. + + -- Tim Abbott Thu, 10 Jul 2008 15:02:31 -0400 + +flint (1.06-2) unstable; urgency=low + + * Improve copyright file to mention other contributors. + * Set priority to optional. + * Improve description. + + -- Tim Abbott Tue, 17 Jun 2008 16:14:49 -0400 + +flint (1.06-1) unstable; urgency=low + + * Initial release (Closes: #480087). + + -- Tim Abbott Fri, 30 May 2008 00:34:12 -0400 --- flint-1.011.orig/debian/compat +++ flint-1.011/debian/compat @@ -0,0 +1 @@ +5 --- flint-1.011.orig/debian/control +++ flint-1.011/debian/control @@ -0,0 +1,54 @@ +Source: flint +Section: libs +Priority: optional +Maintainer: Tim Abbott +Homepage: http://www.flintlib.org/ +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27), libgmp3-dev, libqd-dev, libntl-dev +Standards-Version: 3.8.0 + +Package: libflint-1.011 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: libflint-1.06 +Replaces: libflint-1.06 +Description: C library for number theory, shared library + The Fast Library for Integer Number Theory is a C library which supports + polynomial arithmetic over the integers, fast integer arithmetic and factoring + (including a highly optimized quadratic sieve). + . + FLINT has funtionality similar to that of the Number Theory Library (NTL). + However, unlike NTL, which is designed primarily for asymptotic performance, + FLINT is designed for good performance in small cases as well. + . + This package contains the FLINT shared library. + +Package: libflint-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libflint-1.011 +Description: C library for number theory, development files + The Fast Library for Integer Number Theory is a C library which supports + polynomial arithmetic over the integers, fast integer arithmetic and factoring + (including a highly optimized quadratic sieve). + . + FLINT has funtionality similar to that of the Number Theory Library (NTL). + However, unlike NTL, which is designed primarily for asymptotic performance, + FLINT is designed for good performance in small cases as well. + . + This package contains the FLINT development files. + +# Package: flintqs +# Section: math +# Architecture: any +# Depends: ${shlibs:Depends}, ${misc:Depends}, libflint0 +# Description: C library for number theory, quadratic sieve +# The Fast Library for Integer Number Theory is a C library which supports +# polynomial arithmetic over the integers, fast integer arithmetic and factoring +# (including a highly optimized quadratic sieve). +# . +# FLINT has funtionality similar to that of the Number Theory Library (NTL). +# However, unlike NTL, which is designed primarily for asymptotic performance, +# FLINT is designed for good performance in small cases as well. +# . +# This package contains the FLINT quadratic sieve. --- flint-1.011.orig/debian/control.in +++ flint-1.011/debian/control.in @@ -0,0 +1,54 @@ +Source: flint +Section: libs +Priority: optional +Maintainer: Tim Abbott +Homepage: http://www.flintlib.org/ +Build-Depends: @cdbs@, libgmp3-dev, libqd-dev, libntl-dev +Standards-Version: 3.8.0 + +Package: libflint-1.011 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: libflint-1.06 +Replaces: libflint-1.06 +Description: C library for number theory, shared library + The Fast Library for Integer Number Theory is a C library which supports + polynomial arithmetic over the integers, fast integer arithmetic and factoring + (including a highly optimized quadratic sieve). + . + FLINT has funtionality similar to that of the Number Theory Library (NTL). + However, unlike NTL, which is designed primarily for asymptotic performance, + FLINT is designed for good performance in small cases as well. + . + This package contains the FLINT shared library. + +Package: libflint-dev +Section: libdevel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libflint-1.011 +Description: C library for number theory, development files + The Fast Library for Integer Number Theory is a C library which supports + polynomial arithmetic over the integers, fast integer arithmetic and factoring + (including a highly optimized quadratic sieve). + . + FLINT has funtionality similar to that of the Number Theory Library (NTL). + However, unlike NTL, which is designed primarily for asymptotic performance, + FLINT is designed for good performance in small cases as well. + . + This package contains the FLINT development files. + +# Package: flintqs +# Section: math +# Architecture: any +# Depends: ${shlibs:Depends}, ${misc:Depends}, libflint0 +# Description: C library for number theory, quadratic sieve +# The Fast Library for Integer Number Theory is a C library which supports +# polynomial arithmetic over the integers, fast integer arithmetic and factoring +# (including a highly optimized quadratic sieve). +# . +# FLINT has funtionality similar to that of the Number Theory Library (NTL). +# However, unlike NTL, which is designed primarily for asymptotic performance, +# FLINT is designed for good performance in small cases as well. +# . +# This package contains the FLINT quadratic sieve. --- flint-1.011.orig/debian/copyright +++ flint-1.011/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Tim Abbott in 2008. + +It was obtained from http://www.flintlib.org + +Copyright (C) 2006-2007 William Hart + (C) 2006 Jason Papadopoulos + (C) 2007 David Harvey + (C) 2007 Tomasz Lechowski + (C) 2007 Bill Allombert + (C) 2007 David Howden + +License: + + 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 + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2008, Tim Abbott and is +licensed under the GPL, see above. --- flint-1.011.orig/debian/flintqs.install +++ flint-1.011/debian/flintqs.install @@ -0,0 +1,2 @@ +mpQS usr/lib/flint +tinyQS usr/lib/flint --- flint-1.011.orig/debian/libflint-1.011.install +++ flint-1.011/debian/libflint-1.011.install @@ -0,0 +1 @@ +libflint-*.so usr/lib --- flint-1.011.orig/debian/libflint-1.06.install +++ flint-1.011/debian/libflint-1.06.install @@ -0,0 +1 @@ +libflint-*.so usr/lib --- flint-1.011.orig/debian/libflint-dev.install +++ flint-1.011/debian/libflint-dev.install @@ -0,0 +1,2 @@ +*.h usr/include/FLINT/ +libflint.so usr/lib --- flint-1.011.orig/debian/patches/flint-arm-thumb.patch +++ flint-1.011/debian/patches/flint-arm-thumb.patch @@ -0,0 +1,76 @@ +--- flint-1.011/longlong.h 2008-06-15 21:31:56.000000000 -0600 ++++ ../longlong.h 2012-06-25 19:12:22.747170289 -0600 +@@ -408,7 +408,7 @@ + + #if defined (__arm__) && W_TYPE_SIZE == 32 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ +- __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \ ++ __asm__ (".arm\n\tadds\t%1, %4, %5\n\tadc\t%0, %2, %3" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "rI" (bh), "%r" (al), "rI" (bl) __CLOBBER_CC) + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ +@@ -416,47 +416,47 @@ + if (__builtin_constant_p (al)) \ + { \ + if (__builtin_constant_p (ah)) \ +- __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \ ++ __asm__ (".arm\n\trsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \ + : "=r" (sh), "=&r" (sl) \ + : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \ + else \ +- __asm__ ("rsbs\t%1, %5, %4\n\tsbc\t%0, %2, %3" \ ++ __asm__ (".arm\n\trsbs\t%1, %5, %4\n\tsbc\t%0, %2, %3" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "rI" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \ + } \ + else if (__builtin_constant_p (ah)) \ + { \ + if (__builtin_constant_p (bl)) \ +- __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \ ++ __asm__ (".arm\n\tsubs\t%1, %4, %5\n\trsc\t%0, %3, %2" \ + : "=r" (sh), "=&r" (sl) \ + : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \ + else \ +- __asm__ ("rsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \ ++ __asm__ (".arm\n\trsbs\t%1, %5, %4\n\trsc\t%0, %3, %2" \ + : "=r" (sh), "=&r" (sl) \ + : "rI" (ah), "r" (bh), "rI" (al), "r" (bl) __CLOBBER_CC); \ + } \ + else if (__builtin_constant_p (bl)) \ + { \ + if (__builtin_constant_p (bh)) \ +- __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \ ++ __asm__ (".arm\n\tsubs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \ + else \ +- __asm__ ("subs\t%1, %4, %5\n\trsc\t%0, %3, %2" \ ++ __asm__ (".arm\n\tsubs\t%1, %4, %5\n\trsc\t%0, %3, %2" \ + : "=r" (sh), "=&r" (sl) \ + : "rI" (ah), "r" (bh), "r" (al), "rI" (bl) __CLOBBER_CC); \ + } \ + else /* only bh might be a constant */ \ +- __asm__ ("subs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \ ++ __asm__ (".arm\n\tsubs\t%1, %4, %5\n\tsbc\t%0, %2, %3" \ + : "=r" (sh), "=&r" (sl) \ + : "r" (ah), "rI" (bh), "r" (al), "rI" (bl) __CLOBBER_CC);\ + } while (0) + #if 1 || defined (__arm_m__) /* `M' series has widening multiply support */ + #define umul_ppmm(xh, xl, a, b) \ +- __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++ __asm__ (".arm\n\tumull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) + #define UMUL_TIME 5 + #define smul_ppmm(xh, xl, a, b) \ +- __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) ++ __asm__ (".arm\n\tsmull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) + #ifndef LONGLONG_STANDALONE + #define udiv_qrnnd(q, r, n1, n0, d) \ + do { UWtype __di; \ +@@ -470,6 +470,7 @@ + #else + #define umul_ppmm(xh, xl, a, b) \ + __asm__ ("%@ Inlined umul_ppmm\n" \ ++" .arm\n" \ + " mov %|r0, %2, lsr #16\n" \ + " mov %|r2, %3, lsr #16\n" \ + " bic %|r1, %2, %|r0, lsl #16\n" \ --- flint-1.011.orig/debian/patches/flint-clean.patch +++ flint-1.011/debian/patches/flint-clean.patch @@ -0,0 +1,10 @@ +Index: flint-1.06/makefile +=================================================================== +--- flint-1.06.orig/makefile 2008-06-02 13:55:46.000000000 -0400 ++++ flint-1.06/makefile 2008-06-02 13:56:35.000000000 -0400 +@@ -382,3 +382,5 @@ + F_mpz_mul-timing: $(ZMULOBJ) + $(CC) $(ZMULOBJ) -o Zmul $(LIBS) + ++clean: ++ rm -f *.o libflint*.so mpQS tinyQS libflint.dylib libflint.dll --- flint-1.011.orig/debian/patches/flint-mips.patch +++ flint-1.011/debian/patches/flint-mips.patch @@ -0,0 +1,33 @@ +Author: "Dejan Latinovic" +Description: make it compile on mips/mipsel +diff -uNr flint-1.011.orig/longlong.h flint-1.011/longlong.h +--- flint-1.011.orig/longlong.h 2008-06-16 03:31:56.000000000 +0000 ++++ flint-1.011/longlong.h 2013-10-23 15:48:54.000000000 +0000 +@@ -1011,27 +1011,17 @@ + #endif /* __m88000__ */ + + #if defined (__mips) && W_TYPE_SIZE == 32 +-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 +-#define umul_ppmm(w1, w0, u, v) \ +- __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) +-#else + #define umul_ppmm(w1, w0, u, v) \ + __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \ + : "=d" (w0), "=d" (w1) : "d" (u), "d" (v)) +-#endif + #define UMUL_TIME 10 + #define UDIV_TIME 100 + #endif /* __mips */ + + #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 +-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 +-#define umul_ppmm(w1, w0, u, v) \ +- __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) +-#else + #define umul_ppmm(w1, w0, u, v) \ + __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \ + : "=d" (w0), "=d" (w1) : "d" (u), "d" (v)) +-#endif + #define UMUL_TIME 20 + #define UDIV_TIME 140 + #endif /* __mips */ --- flint-1.011.orig/debian/patches/flint-ntl-interface.patch +++ flint-1.011/debian/patches/flint-ntl-interface.patch @@ -0,0 +1,32 @@ +Index: flint-1.011/makefile +=================================================================== +--- flint-1.011.orig/makefile 2008-07-10 12:45:40.000000000 -0400 ++++ flint-1.011/makefile 2008-07-10 12:45:49.000000000 -0400 +@@ -22,9 +22,9 @@ + + CPP = $(FLINT_CPP) + +-LIBS = -L$(FLINT_GMP_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lm ++LIBS = -L$(FLINT_GMP_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lm -lstdc++ -lntl + +-LIBS2 = -L$(FLINT_GMP_LIB_DIR) -L$(FLINT_NTL_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lntl -lm ++LIBS2 = -L$(FLINT_GMP_LIB_DIR) -L$(FLINT_NTL_LIB_DIR) $(FLINT_LINK_OPTIONS) -lgmp -lpthread -lntl -lm -lstdc++ + + ifndef FLINT_NTL_INCLUDE_DIR + INCS = -I$(FLINT_GMP_INCLUDE_DIR) +@@ -56,6 +56,7 @@ + profiler.h \ + test-support.h \ + long_extras.h \ ++ NTL-interface.h \ + zmod_poly.h + + +@@ -74,6 +75,7 @@ + mpz_poly.o \ + ZmodF_poly.o \ + long_extras.o \ ++ NTL-interface.o \ + zmod_poly.o + + QS: mpQS tinyQS --- flint-1.011.orig/debian/patches/flint-s390.patch +++ flint-1.011/debian/patches/flint-s390.patch @@ -0,0 +1,12 @@ +Index: flint-1.011/longlong.h +=================================================================== +--- flint-1.011.orig/longlong.h 2008-09-23 21:15:19.000000000 -0400 ++++ flint-1.011/longlong.h 2008-09-23 21:15:58.000000000 -0400 +@@ -1774,6 +1774,7 @@ + /* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through + __udiv_w_sdiv (defined in libgcc or elsewhere). */ + #if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) ++extern mp_limb_t __MPN(udiv_w_sdiv)(mp_limb_t * rp, mp_limb_t a1, mp_limb_t a0, mp_limb_t d); + #define udiv_qrnnd(q, r, nh, nl, d) \ + do { \ + UWtype __r; \ --- flint-1.011.orig/debian/patches/flint-soname.patch +++ flint-1.011/debian/patches/flint-soname.patch @@ -0,0 +1,20 @@ +Index: flint-1.06/makefile +=================================================================== +--- flint-1.06.orig/makefile 2008-05-30 00:32:38.000000000 -0400 ++++ flint-1.06/makefile 2008-05-30 00:33:03.000000000 -0400 +@@ -89,7 +89,8 @@ + $(CC) -fPIC -shared -o libflint.dll $(FLINTOBJ) $(LIBS) + + libflint.so: $(FLINTOBJ) +- $(CC) -fPIC -shared -o libflint.so $(FLINTOBJ) $(LIBS) ++ $(CC) -fPIC -shared -Wl,-soname,lib`cat DIRNAME`.so -o lib`cat DIRNAME`.so $(FLINTOBJ) $(LIBS2) ++ ln -s lib`cat DIRNAME`.so libflint.so + + mpn_extras.o: mpn_extras.c $(HEADERS) + $(CC) $(CFLAGS) -c mpn_extras.c -o mpn_extras.o +Index: flint-1.06/DIRNAME +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ flint-1.06/DIRNAME 2008-05-30 00:33:20.000000000 -0400 +@@ -0,0 +1 @@ ++flint-1.011 --- flint-1.011.orig/debian/patches/series +++ flint-1.011/debian/patches/series @@ -0,0 +1,6 @@ +flint-s390.patch +flint-soname.patch +flint-clean.patch +flint-ntl-interface.patch +flint-arm-thumb.patch +flint-mips.patch --- flint-1.011.orig/debian/rules +++ flint-1.011/debian/rules @@ -0,0 +1,13 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_MAKE_BUILD_TARGET = libflint.so MAKECMDGOALS=library + +DEB_MAKE_INVOKE += FLINT_GMP_LIB_DIR=/usr/lib FLINT_CPP="g++ -fPIC" +CFLAGS += -funroll-loops -I/usr/include -I/usr/include/NTL + +common-build-arch:: + +$(DEB_MAKE_INVOKE) QS