debian/0000755000000000000000000000000012120203602007152 5ustar debian/libzn-poly-dev.docs0000644000000000000000000000001712064716450012716 0ustar doc/REFERENCES debian/libzn-poly-dev.install0000644000000000000000000000001612073613640013430 0ustar usr/include/* debian/rules0000755000000000000000000000112612073613640010250 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_clean: dh_auto_clean rm -f makefile override_dh_auto_configure: ./configure --gmp-prefix="/usr" --ntl-prefix="/usr" --triplet="$(DEB_HOST_MULTIARCH)" \ --prefix="$(CURDIR)/debian/tmp/usr" --cflags="$(CFLAGS) $(CPPFLAGS) -fPIC" --ldflags="$(LDFLAGS)" override_dh_auto_build: $(MAKE) libzn_poly-`cat VERSION`.so override_dh_auto_test: $(MAKE) test test/test all override_dh_link: dh_link --package=libzn-poly-dev usr/lib/$(DEB_HOST_MULTIARCH)/libzn_poly-`cat VERSION`.so \ usr/lib/$(DEB_HOST_MULTIARCH)/libzn_poly.so debian/changelog0000644000000000000000000000303512120203506011030 0ustar libzn-poly (0.9-3) unstable; urgency=low * debian/patches/fix_ulong_redefinition.patch: Undefine ulong before defining it again in zn_poly.h. (Closes: #702887) * Change distribution of the previous changelog entry 0.9-2 from experimental to unstable, because that version was accidentally uploaded to unstable. -- Tobias Hansen Wed, 13 Mar 2013 23:54:00 +0100 libzn-poly (0.9-2) unstable; urgency=low * debian/patches/gcc-4.5-mips.patch: The custom C implementation of ZNP_MUL_WIDE from the patch caused the test suite to fail in zn_array_mul_KS1(). Remove that implementation and use the one that was there all along. -- Tobias Hansen Fri, 11 Jan 2013 20:11:51 +0100 libzn-poly (0.9-1) experimental; urgency=low * New upstream release. * New maintainer Debian Science Team, uploader me, with permission from Tim Abbott. * Transition to dh (compat level 9). * Build for multiarch. * Enable hardening flags via dpkg-buildflags. * Don't ship static library. * Enable tests. * Standards-Version 3.9.4 -- Tobias Hansen Sun, 23 Dec 2012 16:02:20 +0100 libzn-poly (0.8-1.1) unstable; urgency=low * Non-maintainer upload. * Fix gcc-4.5 FTBFS on mips, due to old assembly constraints usage (Closes: #623598). -- Aurelien Jarno Mon, 9 May 2011 20:57:23 +0200 libzn-poly (0.8-1) unstable; urgency=low * Initial release (Closes: #480094). -- Tim Abbott Tue, 27 May 2008 20:23:43 -0400 debian/copyright0000644000000000000000000000776012073613640011135 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: zn_poly Source: http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/ Files: * Copyright: Copyright (C) 2007, 2008, David Harvey License: GPL-2-or-3 Files: include/wide_arith.h Copyright: Copyright (C) 2007, 2008, David Harvey Free Software Foundation Victor Shoup Comment: Quoted from COPYING: . The file "wide_arith.h" includes some assembly macros from the file "longlong.h" in GMP 4.2.1; see http://gmplib.org/. The copyright to this code is held by the Free Software Foundation, and it was released under "LGPL v2.1 or later". . The file "wide_arith.h" also includes assembly macros from the file "SPMM_ASM.h" in NTL 5.4.1; see http://www.shoup.net/ntl/. The copyright to this code is held by Victor Shoup, and it was released under "GPL v2 or later". License: GPL-2-or-3 and LGPL-2.1+ and GPL-2+ Files: include/profiler.h Copyright: Copyright (C) 2007, 2008, David Harvey William Hart Comment: Quoted from COPYING: . The filer "profiler.h" contains x86 cycle counting code from the file "profiler.h" in FLINT 1.0; see http://www.flintlib.org/. The copyright to this code is held by William Hart, and it was released under "GPL v2 or later". License: GPL-2-or-3 and GPL-2+ Files: debian/* Copyright: 2008 Tim Abbott 2012 Tobias Hansen License: GPL-2+ License: GPL-2-or-3 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 or version 3 of the License. . 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 versions 2 and 3 can be found in `/usr/share/common-licenses/GPL-2' and `/usr/share/common-licenses/GPL-3', respectively. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program 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 program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in /usr/share/common-licenses/GPL-2 License: LGPL-2.1+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. . You should have received a copy of the GNU Lesser 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 Lesser General Public License version 2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'. debian/patches/0000755000000000000000000000000012120201563010605 5ustar debian/patches/zn_poly_soname.patch0000644000000000000000000000405112073613640014674 0ustar Description: Modify makefile generation script * Install the .so files, not .a. * Add a distclean target. * Pass flags to the linking stage of the shared library. * Add a triplet parameter for multiarch installation. Author: Tobias Hansen --- a/makemakefile.py +++ b/makemakefile.py @@ -75,6 +75,7 @@ parser.add_option("--prefix", dest="prefix", default="/usr/local") parser.add_option("--cflags", dest="cflags", default="-O2") parser.add_option("--ldflags", dest="ldflags", default="") +parser.add_option("--triplet", dest="triplet", default="") parser.add_option("--gmp-prefix", dest="gmp_prefix", default="/usr/local") parser.add_option("--ntl-prefix", dest="ntl_prefix", default="/usr/local") parser.add_option("--use-flint", dest="use_flint", action="store_true", @@ -96,6 +97,7 @@ cflags = options.cflags ldflags = options.ldflags +triplet = options.triplet prefix = options.prefix includes = "-I" + gmp_include_dir + " -I./include" @@ -159,8 +161,10 @@ print print "install:" print "\tmkdir -p %s/include/zn_poly" % prefix -print "\tmkdir -p %s/lib" % prefix -print "\tcp libzn_poly.a %s/lib" % prefix +print "\tmkdir -p %s/lib/%s" % (prefix, triplet) +print "\tcp libzn_poly-*.so %s/lib/%s" % (prefix, triplet) +print "\tln -s %s/lib/%s/lib`cat DIRNAME`.so %s/lib/%s/libzn_poly.so" % \ + (prefix, triplet, prefix, triplet) print "\tcp include/zn_poly.h %s/include/zn_poly" % prefix print "\tcp include/wide_arith.h %s/include/zn_poly" % prefix print @@ -181,7 +185,9 @@ print "\trm -f " + x + "-ntl" for x in demo_progs: print "\trm -f " + x - +print +print "distclean: clean" +print "\trm -f makefile" print print @@ -203,7 +209,7 @@ print "\t$(CC) -shared -o libzn_poly.so $(LIBOBJS) $(LIBS)" print print "libzn_poly-%s.so: $(LIBOBJS)" % version -print "\t$(CC) -shared -Wl,-soname,libzn_poly-%s.so " \ +print "\t$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libzn_poly-%s.so " \ "-o libzn_poly-%s.so $(LIBOBJS) $(LIBS)" % (version, version) print "\t ln -sf libzn_poly-%s.so libzn_poly.so" % version debian/patches/gcc-4.5-mips.patch0000644000000000000000000000170312074060351013643 0ustar Description: Remove old MIPS inline assembly code Since GCC 4.4 it's not possible anymore to use the 'h' constraints for MIPS inline assembly code when doing a multiplication. That's why libzn-poly fails to build from source on mips and mipsel. . The C version of this function is used instead. Author: Tobias Hansen Bug-Debian: http://bugs.debian.org/623598 --- a/include/wide_arith.h +++ b/include/wide_arith.h @@ -240,27 +240,6 @@ #endif -// ------ MIPS ------ - -#if (defined (__mips)) - -#if (UNSIGNED_LONG_BITS == 32) - -#define ZNP_MUL_WIDE(hi, lo, a, b) \ - __asm__ ("multu %2,%3" : "=l" (lo), "=h" (hi) : "d" (a), "d" (b)); - - -#elif (UNSIGNED_LONG_BITS == 64) - -#define ZNP_MUL_WIDE(hi, lo, a, b) \ - __asm__ ("dmultu %2,%3" : "=l" (lo), "=h" (hi) : "d" (a), "d" (b)); - - -#endif - -#endif - - // -------- SPARC -------- debian/patches/fix_ulong_redefinition.patch0000644000000000000000000000051412120201536016357 0ustar Description: Undefine ulong before defining it again. Author: Tobias Hansen Bug-Debian: http://bugs.debian.org/702887 --- a/include/zn_poly.h +++ b/include/zn_poly.h @@ -69,6 +69,9 @@ /* I get really sick of typing unsigned long. */ +#ifdef ulong +#undef ulong +#endif typedef unsigned long ulong; debian/patches/series0000644000000000000000000000010512120176316012025 0ustar zn_poly_soname.patch gcc-4.5-mips.patch fix_ulong_redefinition.patch debian/source/0000755000000000000000000000000012064702377010476 5ustar debian/source/format0000644000000000000000000000001412064671460011702 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000013712073613640010222 0ustar version=3 http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/ releases/zn_poly-(.+).tar.gz debian/libzn-poly-0.9.install0000644000000000000000000000003212073613640013156 0ustar usr/lib/*/libzn_poly-*.so debian/compat0000644000000000000000000000000212064670177010376 0ustar 9 debian/control0000644000000000000000000000230212073613640010570 0ustar Source: libzn-poly Section: math Priority: optional Maintainer: Debian Science Team Uploaders: Tobias Hansen Build-Depends: debhelper (>= 9), patchutils (>= 0.2.25), libgmp3-dev, libntl-dev, python Homepage: http://web.maths.unsw.edu.au/~davidharvey/code/zn_poly/ Standards-Version: 3.9.4 Vcs-Git: git://git.debian.org/debian-science/packages/libzn-poly.git Vcs-Browser: http://git.debian.org/?p=debian-science/packages/libzn-poly.git;a=summary Package: libzn-poly-0.9 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same Description: Library for polynomial arithmetic in Z/nZ[x] zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is any modulus that fits into an unsigned long. Package: libzn-poly-dev Section: libdevel Architecture: any Depends: ${misc:Depends}, libzn-poly-0.9 (= ${binary:Version}) Multi-Arch: same Description: development files for libzn-poly zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is any modulus that fits into an unsigned long. . This package contains the development files for the library.