--- gmp4-4.3.2+dfsg.orig/debian/FAQ
+++ gmp4-4.3.2+dfsg/debian/FAQ
@@ -0,0 +1,17 @@
+Q1:  Is there a C++ wrapper for GMP?
+
+A1: Yes, beginning with GMP 4.0 one is bundled with the release.
+
+Q2: When will the next release happen?
+
+A2: See Future releases below.
+    http://www.swox.com/gmp/#FUTURE
+
+Q3: I get a segfault in a program that uses GMP to calculate numbers with several hundred thousand digits. Why?
+
+A3: Upgrade to GMP 4.2. (Previous version of GMP allocated huge blocks of temporary memory on the stack, causing problems for some system.)
+
+Q4: Are there known bugs in GMP?
+
+A4: See under "Status ..." right below.
+    http://www.swox.com/gmp/#STATUS
--- gmp4-4.3.2+dfsg.orig/debian/libgmp3-doc.examples
+++ gmp4-4.3.2+dfsg/debian/libgmp3-doc.examples
@@ -0,0 +1 @@
+demos
--- gmp4-4.3.2+dfsg.orig/debian/watch
+++ gmp4-4.3.2+dfsg/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/\+dfsg$// \
+ ftp://ftp.gmplib.org/pub/gmp-([\d.]+)/gmp-([\d.]+)\.tar\.gz
--- gmp4-4.3.2+dfsg.orig/debian/TODO
+++ gmp4-4.3.2+dfsg/debian/TODO
@@ -0,0 +1 @@
+
--- gmp4-4.3.2+dfsg.orig/debian/libgmpxx4ldbl.lintian-overrides
+++ gmp4-4.3.2+dfsg/debian/libgmpxx4ldbl.lintian-overrides
@@ -0,0 +1 @@
+libgmpxx4ldbl binary: package-name-doesnt-match-sonames libgmpxx4
--- gmp4-4.3.2+dfsg.orig/debian/libgmp3-doc.README.Debian
+++ gmp4-4.3.2+dfsg/debian/libgmp3-doc.README.Debian
@@ -0,0 +1,21 @@
+		No Docs
+		-------
+
+Please see http://www.swox.com/gmp/#DOC for the documentation.
+Sadly, due to licensing it cannot be shipped in Debian.
+
+See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335403
+and http://lists.debian.org/debian-legal/2006/03/msg00536.html
+
+
+		Demo Code
+		---------
+
+The code in /usr/share/doc/libgmp3-doc/examples/demos comes straight
+out of the GMP source distribution.  As such, the "Makefile.am" files
+are not expected to be directly useful, but should serve as a model
+for building the code.
+
+
+
+ -- Steve M. Robbins <smr@debian.org>, Fri, 14 Apr 2006 04:10:07 -0400
--- gmp4-4.3.2+dfsg.orig/debian/compat
+++ gmp4-4.3.2+dfsg/debian/compat
@@ -0,0 +1 @@
+7
--- gmp4-4.3.2+dfsg.orig/debian/Notes
+++ gmp4-4.3.2+dfsg/debian/Notes
@@ -0,0 +1,25 @@
+		Documentation
+		-------------
+
+The GMP documentation is licensed under terms of the GNU Free
+Documentation License.  Sadly, Debian has decided to take a hard line
+on this license: the presence of two sentences is enough to prevent
+Debian from shipping the documentation.
+
+See:
+  BTS 335403
+  http://lists.debian.org/debian-legal/2006/03/msg00536.html
+
+
+
+		Split Upstream Source
+		---------------------
+
+tar xzf gmp-4.2.2.tar.gz
+mv gmp-4.2.2 gmp-4.2.2+dfsg
+mkdir gmp-doc-4.2.2
+mv gmp-4.2.2+dfsg/doc/ gmp-doc-4.2.2/
+mkdir gmp-4.2.2+dfsg/doc
+touch gmp-4.2.2+dfsg/doc/Makefile.{am,in}
+tar czf gmp_4.2.2+dfsg.orig.tar.gz gmp-4.2.2+dfsg
+tar czf gmp-doc_4.2.2.orig.tar.gz gmp-doc-4.2.2
--- gmp4-4.3.2+dfsg.orig/debian/fix-gmp-h.sh
+++ gmp4-4.3.2+dfsg/debian/fix-gmp-h.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# $1 is directory
+
+set -e
+
+test -d "$1" || exit 1
+
+oldfn="$1/gmp.h"
+test -f "$oldfn" || exit 2
+
+fixname=`sed -e 's/#include//' debian/gmp.h | $CC -E - | sed -e '/^#/d' -e 's/ "//' -e 's/"//'`
+mv $oldfn $1/$fixname
+cp debian/gmp.h $oldfn
+
--- gmp4-4.3.2+dfsg.orig/debian/copyright
+++ gmp4-4.3.2+dfsg/debian/copyright
@@ -0,0 +1,47 @@
+	GMP Debian Package
+	------------------
+
+This gmp package was built for Debian by 
+
+  Steve M. Robbins <smr@debian.org>
+  Philipp Matthias Hahn <pmhahn@debian.org>
+
+from sources obtained at http://gmplib.org/ .
+
+
+	GMP Source Code
+	---------------
+
+Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
+2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library 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 3 of the License, or (at your
+option) any later version.
+
+The GNU MP Library 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 the GNU MP Library.  If not, see http://www.gnu.org/licenses/.
+
+The license text is contained in /usr/share/common-licenses/LGPL-3.
+
+
+	GMP Documentation
+	-----------------
+
+The documentation is released under the GNU Free Documentation License
+(GFDL) and it has cover texts.  As such, it has been determined not to
+meet the Debian Free Software Guidelines, and is not shipped in the
+debian packages.
+
+The demo code in the -doc package is covered either by the LGPL, or
+under the GNU General Public License /usr/share/common-licenses/GPL.
+See the individual source files to determine the license under which
+it falls.
--- gmp4-4.3.2+dfsg.orig/debian/control
+++ gmp4-4.3.2+dfsg/debian/control
@@ -0,0 +1,55 @@
+Source: gmp4
+Homepage: http://gmplib.org/
+Section: libs
+Priority: optional
+Build-Depends: m4, debhelper (>= 7), quilt, gcc-multilib [amd64 kfreebsd-amd64 powerpc ppc64], g++-multilib [amd64 kfreebsd-amd64 powerpc ppc64]
+Maintainer: Debian Scientific Computing Team <pkg-scicomp-devel@lists.alioth.debian.org>
+Uploaders: Steve M. Robbins <smr@debian.org>
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-scicomp/gmp/trunk/?rev=0&sc=0
+Vcs-Svn: svn://svn.debian.org/svn/pkg-scicomp/gmp/trunk
+Standards-Version: 3.9.1
+
+Package: libgmp3c2
+Section: libs
+Priority: optional
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libgmp3, libgmp2 (<< 2.0.2-10)
+Replaces: libgmp3
+Description: Multiprecision arithmetic library
+ GNU MP is a programmer's library for arbitrary precision
+ arithmetic (ie, a bignum package).  It can operate on signed
+ integer, rational, and floating point numeric types.
+ .
+ It has a rich set of functions, and the functions have a regular
+ interface.
+
+Package: lib32gmp3
+Section: libs
+Priority: optional
+Architecture: amd64 ppc64 kfreebsd-amd64
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Conflicts: libc6-i386 (<= 2.9-18)
+Description: Multiprecision arithmetic library (32bit)
+ GNU MP is a programmer's library for arbitrary precision
+ arithmetic (ie, a bignum package).  It can operate on signed
+ integer, rational, and floating point numeric types.  This
+ package includes a 32 bit version of the shared library.
+ .
+ It has a rich set of functions, and the functions have a regular
+ interface.
+
+Package: lib64gmp3
+Section: libs
+Priority: optional
+Architecture: powerpc
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Multiprecision arithmetic library (64bit library)
+ GNU MP is a programmer's library for arbitrary precision
+ arithmetic (ie, a bignum package).  It can operate on signed
+ integer, rational, and floating point numeric types.  This
+ package includes a 64 bit version of the shared library.
+ .
+ It has a rich set of functions, and the functions have a regular
+ interface.
+
--- gmp4-4.3.2+dfsg.orig/debian/README.Debian
+++ gmp4-4.3.2+dfsg/debian/README.Debian
@@ -0,0 +1,10 @@
+		Documentation and Example Code
+		------------------------------
+
+Sadly, due to licensing the GMP documentation is no longer shipped in
+Debian.  The package libgmp3-doc now contains only demo code.
+
+Please see http://www.swox.com/gmp/#DOC for the documentation.
+
+
+ -- Steve M. Robbins <smr@debian.org>, Fri, 14 Apr 2006 13:07:10 -0400
--- gmp4-4.3.2+dfsg.orig/debian/README.source
+++ gmp4-4.3.2+dfsg/debian/README.source
@@ -0,0 +1,57 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
--- gmp4-4.3.2+dfsg.orig/debian/changelog
+++ gmp4-4.3.2+dfsg/debian/changelog
@@ -0,0 +1,809 @@
+gmp4 (2:4.3.2+dfsg-2) unstable; urgency=low
+
+  * Re-introduce the libgmp3c2 package to ease the transition to GMP 5.
+    See http://lists.debian.org/debian-release/2011/03/msg00366.html.
+  
+  * control: Add ${misc:Depends} and update Standards-Version.
+
+ -- Steve M. Robbins <smr@debian.org>  Mon, 21 Mar 2011 22:35:09 -0500
+
+gmp (2:4.3.2+dfsg-1) unstable; urgency=low
+
+  * New upstream version.
+    - patches/fix-lib-versioning.patch: Remove.  Libraries are properly
+    versioned.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 09 Jan 2010 00:27:30 -0600
+
+gmp (2:4.3.1+dfsg-3) unstable; urgency=low
+
+  * rules: On amd64, install 32-bit libs in /usr/lib32.  Closes: #533849.
+  * control: Conflict with libc6-i386 versions prior to change removing
+    /emul/ia32-linux/lib; see #533849 for details.
+
+ -- Steve M. Robbins <smr@debian.org>  Mon, 03 Aug 2009 11:09:08 -0500
+
+gmp (2:4.3.1+dfsg-2) unstable; urgency=low
+
+  * rules: Explicitly set NM for the powerpc 64-bit build.  Disable FAT
+    binary for kfreebsd-amd64.  Closes: #537072.  Remove bashism (touch
+    Makefile.{am,in}).  Closes: #535383.
+
+ -- Steve M. Robbins <smr@debian.org>  Thu, 23 Jul 2009 05:16:25 -0500
+
+gmp (2:4.3.1+dfsg-1) unstable; urgency=low
+
+  * New upstream.
+    - Incorporate previous NMU patch.  Closes: #528923.
+    - Remote patches applied upstream: mpf_eq.diff, mpf_set_str.c.4.diff, 
+      perfpow.c.diff
+    - Upstream includes fix for scanf/sscanffuns.c.  Closes: #523076.
+
+  * gmp.h: Add case for SH processor.  Closes: #530747.  Add case for
+    AVR32.  Closes: #528511.
+  
+  * patches/fix-lib-versioning.patch: New.  Fix versioning of shared libs;
+    c.f. http://gmplib.org/list-archives/gmp-bugs/2009-May/001475.html.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri, 29 May 2009 21:42:35 -0500
+
+gmp (2:4.2.4+dfsg-8.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Don't build libgmp3c2 as 64bit library on powerpc.
+    Closes: #528768, #528840.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 16 May 2009 13:39:16 +0200
+
+gmp (2:4.2.4+dfsg-8) unstable; urgency=low
+
+  * Upload of -7 to unstable.  No source changes.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 09 May 2009 10:03:22 -0500
+
+gmp (2:4.2.4+dfsg-7) experimental; urgency=low
+
+  * control:
+  * rules: Do not build multilibs for sparc.  Closes: #522524.  Reinstate
+    64-bit libs for powerpc since last change reintroduced bugs #454494,
+    and #506791.  Build lib64* packages only for powerpc.
+
+  * gmp.h: Add case for mips.
+  
+ -- Steve M. Robbins <smr@debian.org>  Mon, 20 Apr 2009 00:15:56 -0500
+
+gmp (2:4.2.4+dfsg-6) experimental; urgency=low
+
+  * gmp.h: Add cases for arm, hppa, sparc.  
+  
+  * control:
+  * rules: Do not build multilibs for i386, powerpc, s390.  Closes:
+    #522460.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri, 03 Apr 2009 23:54:21 -0500
+
+gmp (2:4.2.4+dfsg-5) experimental; urgency=low
+
+  * rules: Support bi-arch builds (32 and 64 bit) where possible.  
+    Closes: #454494, #506791.
+  
+  * control: Standards-Version 3.8.1; no changes.
+
+ -- Steve M. Robbins <smr@debian.org>  Thu, 02 Apr 2009 22:57:14 -0500
+
+gmp (2:4.2.4+dfsg-4) experimental; urgency=low
+
+  * rules: Add --build and --host options to configure.  Supply jobs
+    option (-jN) only to initial make rather than setting MAKEFLAGS.  Run
+    test suite if build machine is same as target machine.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 15 Mar 2009 03:43:27 -0500
+
+gmp (2:4.2.4+dfsg-3) experimental; urgency=low
+
+  * rules: Revert to debhelper in preparation for building 32- and 64-bit
+    flavours on amd64 and ppc.  Upload to experimental to check that the
+    package builds across all arches.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 01 Mar 2009 23:31:22 -0600
+
+gmp (2:4.2.4+dfsg-2) unstable; urgency=low
+
+  * patches/mpf_eq.diff:
+  * patches/mpf_set_str.c.4.diff:
+  * patches/perfpow.c.diff: New.  Patches from upstream http://gmplib.org/
+
+ -- Steve M. Robbins <smr@debian.org>  Tue, 24 Feb 2009 18:21:42 -0600
+
+gmp (2:4.2.4+dfsg-1) experimental; urgency=low
+
+  * New upstream version.  Closes: #499632.
+  
+  * Set Standards-Version to 3.8.0; no changes required.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 21 Sep 2008 00:22:19 -0500
+
+gmp (2:4.2.3+dfsg-1) experimental; urgency=low
+
+  * New upstream version.  Upload to experimental to avoid interfering
+    with Lenny release.
+  * debian/patches/01_gmp.h-std-file.diff:
+  * debian/patches/02_noexec-stack.diff:
+  * debian/patches/03_gnu89-inline.diff: Removed.  Applied upstream.
+  
+  * debian/README.source: New.  Describe how to use simple patchsys.
+
+  * debian/rules: New target get-orig-source.  Target runs autoreconf
+    before generating the .orig.tar.gz file, so we remove
+    DEB_AUTO_UPDATE_AUTOCONF and DEB_AUTO_UPDATE_AUTOMAKE settings.
+  * debian/control: Remove build-dependency on automake, autoconf, and
+    libtool.
+  
+  * Switch to Debian-Scicomp subversion repository.
+  * debian/control: Add Vcs-Browser and Vcs-Svn fields.  Change maintainer
+    to pkg-scicomp-devel, change uploaders to me.
+  
+  * debian/rules: Base decision for --disable-fat on DEB_HOST_ARCH_CPU
+    instead of DEB_HOST_ARCH, to build on freebsd-amd64.  Closes: #490555.
+  
+ -- Steve M. Robbins <smr@debian.org>  Sat, 09 Aug 2008 16:43:50 -0500
+
+gmp (2:4.2.2+dfsg-3) unstable; urgency=low
+
+  * debian/rules:
+  * debian/control: Move from automake 1.8 to automake 1.9.  
+    Closes: #473306.
+  
+  * debian/patches/03_gnu89-inline.diff: Add gnu_inline function attribute
+    to extern inline functions.  Closes: #430598.  
+    Patch courtesy of Ludovic Courtès; see
+    http://gmplib.org/list-archives/gmp-bugs/2008-April/000980.html.
+
+  * debian/rules: Install upstream changelog only in -dev package.
+    Closes: #442895.
+  
+  * debian/control: Replace Source-Version by binary:Version.  Bump
+    Standards-Version from 2.7.2 to 2.7.3; no changes required.  Add
+    HomePage field.
+  
+  * debian/copyright: Freshen; include copyright statement.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 09 Apr 2008 01:15:29 -0500
+
+gmp (2:4.2.2+dfsg-2) unstable; urgency=low
+
+  * gmp-h.in: include cstdio to obtain std::FILE.  Closes: #463187.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 02 Feb 2008 03:08:02 -0600
+
+gmp (2:4.2.2+dfsg-1) unstable; urgency=low
+
+  * New upstream version.
+  * Remove patches: 01_libversion, 03_x86-fat, 04_gcc4.3-inline, and
+    05_remove-docs.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 15 Sep 2007 21:45:17 -0500
+
+gmp (2:4.2.1+dfsg-6) unstable; urgency=low
+
+  * debian/rules:
+  * debian/patches: Rework packaging using cdbs.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 15 Sep 2007 15:11:21 -0500
+
+gmp (2:4.2.1+dfsg-5) unstable; urgency=low
+
+  * debian/control: Rename libgmpxx4 to libgmpxx4ldbl.  Closes: #430253.
+  Set Standards-Version to 3.7.2; no changes.
+  
+  * Apply patch gcc4.3-inline.diff
+    (http://gmplib.org/list-archives/gmp-devel/2007-May/000745.html).
+    Closes: #431495.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 11 Jul 2007 00:05:28 -0500
+
+gmp (2:4.2.1+dfsg-4) unstable; urgency=high
+
+  * Build with -O0 on m68k due to a bug in gcc-4.1.  Closes: #378719.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 19 Jul 2006 22:06:09 -0400
+
+gmp (2:4.2.1+dfsg-3) unstable; urgency=high
+
+  * Disable fat support for amd64, as it is broken upstream.  Thanks to
+    Steinar H. Gunderson for initial version of patch.  Closes: #376353.
+
+ -- Steve M. Robbins <smr@debian.org>  Mon, 17 Jul 2006 23:15:30 -0400
+
+gmp (2:4.2.1+dfsg-2) unstable; urgency=low
+
+  * Enable fat libraries.  Closes: #362759.  Applied patch
+    debian/patches/x86-fat.diff, adapted from
+    http://www.swox.com/gmp/patches/x86-fat.diff.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri, 30 Jun 2006 22:34:47 -0400
+
+gmp (2:4.2.1+dfsg-1) unstable; urgency=low
+
+  * New upstream.
+  
+  * Fix SONAME on libgmpxx.  Closes: #368310.
+    - introduces package libgmpxx4.
+  
+  * A test case miscompiles with -O3.  Build with -O2.  Closes: #372563.
+  
+  * Do not install private headers.  Closes: #363692.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 18 Jun 2006 21:20:03 -0400
+
+gmp (4.2.dfsg-1) unstable; urgency=low
+
+  * New upstream version.  Closes: #359147, #362273.
+    - Remove all patches except gmp-4.2-noexecstack_cfgs.diff for
+      non-executable stack.
+
+  * Remove non-DFSG documentation.  Closes: #335403.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 15 Apr 2006 02:34:55 -0400
+
+gmp (4.1.4-11) unstable; urgency=low
+
+  * Apply two more upstream patches:
+    - http://www.swox.com/gmp/patches/gmp-impl.h.MPF_SIGNIFICANT_DIGITS.diff
+    - http://www.swox.com/gmp/patches/gmp-impl.h.MPN_SIZEINBASE.diff
+
+  * Apply patch for big-endian ARM (thanks, Lennert Buytenhek).
+  Closes: #333612.
+  
+  * Apply patch to turn off executable stack (thanks, Sheplyakov Alexei).
+  Closes: #323944.
+  
+  * Run "autoreconf" to update autotools files.  Closes: #304635.
+  
+ -- Steve M. Robbins <smr@debian.org>  Thu, 13 Oct 2005 23:13:04 -0400
+
+gmp (4.1.4-10) unstable; urgency=low
+
+  * debian/rules: provide only libgmp3c2 in libgmp3c2.shlib file.
+    Closes: #322691
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 13 Aug 2005 13:38:00 -0400
+
+gmp (4.1.4-9) unstable; urgency=low
+
+  * Build with -O2 on m68k (thanks, Matthias Klose and Laurent Fousse).
+    Closes: #319205.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun,  7 Aug 2005 23:23:08 -0400
+
+gmp (4.1.4-8) unstable; urgency=low
+
+  * Re-release to fix i386 build.  The -7.1 upload was built
+  against a non-existent libstdc++6.  Closes: #317636.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 10 Jul 2005 09:42:44 -0400
+
+gmp (4.1.4-7.1) unstable; urgency=medium
+
+   * NMU.
+   * debian/rules: Fix typo in dh_makeshlibs, referencing a non existing
+     package.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 9 Jul 2005 18:22:58 +0200
+
+gmp (4.1.4-7) unstable; urgency=low
+
+  * CXX transition (thanks to Matthias Klose for patches):
+    - Split out the C++ library into package libgmp3xx.  Closes: #311610.
+    - Rename libgmp3 to libgmp3c2, otherwise packages relying on the C++
+      library in libgmp3 will break.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri,  8 Jul 2005 23:38:22 -0400
+
+gmp (4.1.4-6) unstable; urgency=low
+
+  * mpn/generic/rootrem.c: Fix buffer overrun in mpz_root(), mpz_rootrem().
+    Upstream patch: http://www.swox.com/gmp/patches/mpn_rootrem.c.diff
+  
+  * debian/FAQ: New; taken from http://www.swox.com/gmp.  Explains
+    the segfaulting problem.  Closes: #284978.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri,  8 Apr 2005 20:13:58 -0400
+
+gmp (4.1.4-5) unstable; urgency=low
+
+  * debian/rules: Don't run test suite when cross-compiling
+  (thanks, NIIBE Yutaka).  Closes: #282060.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 28 Nov 2004 09:21:11 -0500
+
+gmp (4.1.4-4) unstable; urgency=low
+
+  * debian/rules: Don't package gmp-developer docs.
+  * debian/README.Debian: Clarify that the primary documentation consists
+    of info files.  Closes: #276856.
+  
+  * debian/control: Suggest libmpfr-dev (now available in the Debian
+    archive).  Closes: #278005.
+
+ -- Steve M. Robbins <smr@debian.org>  Sun, 24 Oct 2004 03:22:47 -0400
+
+gmp (4.1.4-3) unstable; urgency=low
+
+  * debian/rules: Do not build mpfr library; it will be packaged
+    separately from an updated source (see bug #276085).
+  
+  * debian/rules: Install some internal headers needed to build mpfr.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 13 Oct 2004 00:15:01 -0400
+
+gmp (4.1.4-2) unstable; urgency=high
+
+  * gmp-impl.h: Apply patch to fix build on amd64
+    (http://swox.com/list-archives/gmp-discuss/2004-September/001376.html)
+    (thanks, Torbjorn Granlund).  Closes: #275129.
+  
+  * debian/rules: Add "make check".
+
+ -- Steve M. Robbins <smr@debian.org>  Mon, 11 Oct 2004 14:39:03 -0400
+
+gmp (4.1.4-1) unstable; urgency=low
+
+  * New upstream version.  Closes: #272930.
+
+ -- Steve M. Robbins <smr@debian.org>  Mon, 11 Oct 2004 14:38:49 -0400
+
+gmp (4.1.3-3) unstable; urgency=low
+
+  * mpf/sub.c: Apply patch http://www.swox.com/list-archives/gmp-announce/2004-July.txt
+  to fix mpf_sub().  Closes: #263861.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 11 Aug 2004 23:07:23 -0400
+
+gmp (4.1.3-2) unstable; urgency=low
+
+  * debian/control: Weaken the relationship of libgmp3-dev with libstdc++-dev 
+  from "depends" to "recommends" as it is perfectly possible to develop
+  on a C-only system.  Closes: #254265.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 24 Jul 2004 22:14:44 -0400
+
+gmp (4.1.3-1) unstable; urgency=low
+
+  * New upstream.  Closes: #248317.
+    - debian/rules: The FFT bug (#234984) has been fixed, so we configure
+      with fft again.
+  
+  * Update to standards version 3.6.1
+    - debian/rules: Set LDFLAGS to '-Wl,-z,defs' so that any undefined
+      reference in building the shared libs is flagged.
+  
+ -- Steve M. Robbins <smr@debian.org>  Sun, 16 May 2004 00:30:32 -0400
+
+gmp (4.1.2-4) unstable; urgency=low
+
+  * Configure using --disable-fft; a workaround for a critical bug in FFT
+    multiply code.  Closes: #234984.
+  
+  * debian/rules: Do not install /usr/share/info/dir*.  Closes: #219599.
+
+ -- Steve M. Robbins <smr@debian.org>  Wed, 17 Mar 2004 20:01:01 -0500
+
+gmp (4.1.2-3) unstable; urgency=low
+
+  * control: Build-depend on debhelper (>=4.1.1) since we use dh_shlibdeps -L
+    (thanks, Bill Allombert).  Closes: #188037.  Set Standards-Version to
+    3.5.9 (no changes).  Move libgmp3-dev to libdevel-section.
+
+  * Back out of the changes to ltmain.sh (libtool), mpn/Makeasm.am,
+    and all the associated autotools-generated files (configure,
+    Makefile.in, etc).  Kevin Ryde explained that in fact gmp ships
+    with a newer ltmain.sh than exists in Debian, and it is necessary
+    to use the newer version to have libgmpxx correctly linked with
+    g++ rather than gcc.  See the discussion in bug #143543.  Thanks,
+    Kevin!
+  
+  * Remove pa32 EPILOGUE statement patches.  Closes: #186786.
+  
+  * gmp-impl.h: Add __s390__ case for the ieee_double_extract union
+    #ifdefs.  Corrects a build failure.  Thanks, Kevin Ryde.
+  
+  * mpfr/rnd_mode.c: #ifdef around each case in mpfr_set_machine_rnd_mode().
+    Corrects build failure on arm.  Thanks again, Kevin Ryde.
+
+  * debian/README.Debian: Don't mention C++ interface package.
+
+  * debian/rules: Remove commented-out debhelper cruft.
+
+ -- Steve M. Robbins <smr@debian.org>  Sat, 19 Apr 2003 13:00:03 -0400
+
+gmp (4.1.2-2) unstable; urgency=low
+
+  * Could find no debian packages that rely on internal GMP headers
+    being installed.  Do not install longlong.h (closes: #184540)
+    nor gmp-mparam.h (closes: #184543).
+  
+  * Build C++ libraries.  Closes: #143543.  
+    Requires updated libtool in order to correctly support inter-library
+    dependency.  Had to re-run all the autotools, so the diff is much
+    larger, alas.
+  
+  * debian/rules: Remove m68k compiler bug workaround.  Closes: #186787.
+  
+  * mpn/Makeasm.am: Remove "--tag=CC" from libtool invocation as new libtool
+    does not grok --tag.
+  
+  * configfsf.guess:
+  * configfsf.sub: Update with newest version of file in /usr/share/misc.
+  
+  * Build MPFR library.
+
+ -- Steve M. Robbins <smr@debian.org>  Fri,  4 Apr 2003 23:15:59 -0500
+
+gmp (4.1.2-1) unstable; urgency=low
+
+  * New maintainer team.
+  
+  * New upstream source.
+    Closes:  #158397.
+  
+  * Adhere to policy version to 3.5.8.
+  
+  * Make -dev package depend on ${Source-Version} of library package.
+    Closes: #146604.
+  
+  * Make -doc package replace old libgmp3 packages that formerly held
+    the info files.
+  
+ -- Steve M. Robbins <smr@debian.org>  Wed, 26 Feb 2003 19:10:43 -0500
+
+libgmp3 (4.0.1-3) unstable; urgency=low
+
+  * Installed upstream patch to gmp_printf and gmp_scanf. closes: #141879
+  * Removed bashism from echo in rules file for shlibs. closes: #141877
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Tue,  9 Apr 2002 11:10:41 -0400
+
+libgmp3 (4.0.1-2) unstable; urgency=low
+
+  * Installed patch provided by LaMont Jones for hppa. closes: #140816
+  * Added GFDL information to the copyright file. closes: #141411
+  * Typo in last changelog entry for wrong bug number. closes: #123659
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Sun,  7 Apr 2002 15:20:00 -0400
+
+libgmp3 (4.0.1-1) unstable; urgency=low
+
+  * New upstream source. closes: #133279
+  *    changed CNFL option "target" to "build".
+  *    provides compilable examples. closes: #123695
+  * added >= version to shlibs file. closes: #70754
+  * libgmp4-dev Suggests: libgmp4-doc. closes: #130864
+  * Removed old libgmp3.so symlinks from lib and -dev package.
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Tue, 12 Mar 2002 17:57:18 -0500
+
+libgmp3 (3.1.1-13) unstable; urgency=low
+
+  * REALLY removed gmp-impl.h instead of gmp_impl.h. closes: #110758
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Sun, 16 Dec 2001 23:29:21 -0500
+
+libgmp3 (3.1.1-12) unstable; urgency=low
+
+  * Fixed info entry for mpn-lshift. closes: #77146
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Tue, 20 Nov 2001 10:24:31 -0500
+
+libgmp3 (3.1.1-11) unstable; urgency=low
+
+  * corrected typo in copyright file. closes: #118890
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Fri,  9 Nov 2001 18:55:41 -0500
+
+libgmp3 (3.1.1-10) unstable; urgency=low
+
+  * incorporated NMU patch. Thanks John! closes: #112711
+  * applied John's get_str.c patch. closes: #112589
+  * removed gmp_impl.h. Thanks Steve! closes; #110758
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Fri, 12 Oct 2001 14:38:10 -0400
+
+libgmp3 (3.1.1-9.1) unstable; urgency=low
+
+  * NMU
+  * Applied Red Hat patch to fix gmp for IA-64, closes: #112711
+
+ -- John R. Daily <jdaily@progeny.com>  Thu, 11 Oct 2001 09:10:14 -0500
+
+libgmp3 (3.1.1-9) unstable; urgency=low
+
+  * Added patch from Kevin Ryde adding mp to shlibs, closes: #96454
+  * Changed priority on -dev to match new overrides file (optional)
+  * Added newest config.sub and config.guess files taken from
+  *       http://subversions.gnu.org/cgi-bin/cvsweb/config/
+  *       closes: #97363
+  * Stripped note and comment sections from libs to satisfy lintian
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Wed, 16 May 2001 11:34:55 -0400
+
+libgmp3 (3.1.1-8) unstable; urgency=low
+
+  * created new package (libgmp3-doc) containing gmp.info and 
+  *         additional docs and demos previously in runtime, closes: #96224
+  * added README.headers explaining the additional header files in -dev
+  * added README.doc to include in runtime and -dev packages
+  *         explaining the new location for the documentation files
+  * added patch provided by LaMont Jones for PARISC, closes: #96235
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Sat,  5 May 2001 19:45:00 -0400
+
+libgmp3 (3.1.1-7) unstable; urgency=low
+
+  * added memory patch for m68k, closes: #96029
+  * finally changed priority to match the overrides file...
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Wed,  2 May 2001 10:15:58 -0400
+
+libgmp3 (3.1.1-6) unstable; urgency=low
+
+  * changed config option to use --enable-mpbsd, creating the
+  *    needed mp libs, closes: #93361
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Wed, 25 Apr 2001 09:04:04 -0400
+
+libgmp3 (3.1.1-5) unstable; urgency=low
+
+  * provided --prefix=/usr to config to properly configure .la file.
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Mon, 23 Apr 2001 10:51:39 -0400
+
+libgmp3 (3.1.1-4) unstable; urgency=low
+
+  * added --enable-bsdmp in configure. closes: #92544
+  * added compatablity links for libmp (.a .so). closes: #92545
+  * used make install to use libtool on .la libs. closes: #89552
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Sun,  8 Apr 2001 13:34:14 -0400
+
+libgmp3 (3.1.1-3) unstable; urgency=low
+
+  * Changed maintainer in control to match key, for maintainer upload credit
+  *   closes: #70777, #78501, #79136, #70781, #78819, #79847, #80996
+  *   closes: #79283, #71696, #70751
+  * Added updated version of config.guess and config.sub closes: #84911
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Tue, 27 Feb 2001 05:09:10 -0500
+
+libgmp3 (3.1.1-2) unstable; urgency=low
+
+  * Fixed info file conflict between libgmp2 and libgmp3 closes: #70777
+  * Removed acconfig.h (actually *config.h) closes: #78501
+  * Removed broken and unneccessary info symlinks closes: #79136
+  * Added "Conflicts: libgmp2-dev" closes: #70781, #78819, #79847, #80996, #79283
+  * Added libgmp.la to -dev package closes: #71696
+  * Added demos and doc to /usr/share/doc/libgmp3 closes #70751
+  * Added Build-Depends: m4
+
+ -- Dale Scheetz (Dwarf #1) <dwarf@polaris.net>  Sun, 25 Feb 2001 15:53:26 -0500
+
+libgmp3 (3.1.1-1) unstable; urgency=low
+
+  * new upstream source
+  * distclean fixed in upstream source to remove config.cache closes: #70919
+  * added --target=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` closes: #70808
+  * removed config.h from header files in -dev package closes: #70775
+  *                                               also closes: #70748
+  * moved ldconfig into 'configure' stage only closes: #70809
+  * created /usr/share symlinks as per policy
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 22 Oct 2000 16:09:31 -0400
+
+libgmp3 (3.1.0-1) unstable; urgency=low
+
+  * new upstream source
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sat, 26 Aug 2000 06:46:26 -0400
+
+libgmp2 (2.0.2-6) frozen unstable; urgency=low
+
+  * stripping libgmp2.a creates unsatisfied references by removing
+  *   desirable entry points. Stopped stripping this file. (no bug report)
+  * removed superfluous /usr/include/gmp2 directory. closes: #56720
+  * removed bash file globbing from install commands. closes: #61588
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  9 Apr 2000 04:12:22 -0400
+
+libgmp2 (2.0.2-5) frozen unstable; urgency=low
+
+  * Applied patch from Ben Collins for longlong.h - closes: #59210
+
+ -- Dale Scheetz <dwarf@polaris.net>  Tue, 29 Feb 2000 10:33:30 -0500
+
+libgmp2 (2.0.2-4) unstable; urgency=low
+
+  * Added all header files to /usr/include - closes: #48948
+  * Removed /usr/include/gmp2 and replaced links with header files.
+  * Applied patch to package description - closes: #51818
+  * Added conflict with older -dev packages - closes: #49284 
+  * Moved sparc rules patch into all architectures
+  *                        (by adding -DPIC to CFLAGS)
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu, 16 Dec 1999 22:26:19 -0500
+
+libgmp2 (2.0.2-3.1) unstable; urgency=low
+
+  * NMU for sparc, PLEASE INCLUDE THIS PATCH FROM THE BTS!
+  * Fixes sparc failure (apparent in ssh when generating 'p')
+
+ -- Ben Collins <bcollins@debian.org>  Sat, 14 Aug 1999 19:11:48 -0400
+
+libgmp2 (2.0.2-3) unstable; urgency=low
+
+  * Compiled against latest potato libc6
+  * Corrected line wrap in patch for power-pc: fixes 41303
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 18 Jul 1999 14:47:43 -0400
+
+libgmp2 (2.0.2-2) unstable; urgency=low
+
+  * Returned the mistakenly removed '-Wl,...' option for the linker.
+  *           fixes: 38686, 38693, 38786, 38800, 38846, 38849, 38859
+  *           fixes: 38664, 38665, 38697
+  * Added compatibility links for the old and the new linked programs.
+  * Changed cp to install for install scripts, giving proper execute 
+  *    permissions with any umask, fixes: 38696
+  * Added Conflicts: gmp2, gmp
+  *       fixes: 38666, 38683, 38515, 38913, 38773, 38677
+  * New Replaces: Conflicts: gmp2-dev, fixes: 38653
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sat,  5 Jun 1999 19:24:10 -0400
+
+libgmp2 (2.0.2-1) unstable; urgency=low
+
+  * Installed the following Daniel Jacobowitz set of patches:
+  *
+  * * Add patch for powerpc-linux support (fixes bug#31032, bug#31731).
+  * * Remove debian/files in clean target (fixes bug#32323).
+  * * Add the patches from the author at
+  *   <http://www.matematik.su.se/~tege/gmp/> to fix a number of upstream
+  *   bugs (fixes bug#26804):
+  *   * A typo in mpq_equal makes it fail if the first compared operand is
+  *     negative. This patch corrects the problem. Joe Keane found the
+  *     problem and wrote the patch.
+  *   * Several errors in mpf_set_str and mpf_get_str make these functions
+  *     segfault, and possibly generate incorrect results. This also
+  *     affects mpf_out_str, mpf_inp_str, and mpf_init_set_str. This
+  *     gzip'ed patch fixes these errors.
+  *   * A bug in a test case makes ake check' fail using the N32 ABI
+  *     under Irix6. Apply this patch to mpz/tests/t-powm_ui.c to fix the
+  *     bug. (Note that the N32 ABI isn't really supported in GMP; you
+  *     need to pass -n32 -mips3 -D_LONG_LONG_LIMB' manually to make GMP
+  *     build correctly.)
+  *   * The performance on SPARC is poor because of a typo that causes
+  *     some of the assembly code to be omitted. Apply this patch to
+  *     mpn/configure.in to fix this.
+  *   * A bug in mpz_invert makes it sometimes return a negative result,
+  *     and sometimes not detect when an inverse does not exist. Apply
+  *     this patch to mpz/invert.c to fix this.
+  *   * A bug in mpq_add and mpq_sub makes them work unreliably due to
+  *     references outside of allocated memory. Apply this patch to the
+  *     mpq subdirectory to fix this.
+  *   * A change to GCC (I think from version 2.8) makes GMP fail to build
+  *     on IBM RS/6000 computers running AIX. You'll see complaints of
+  *     unrecognized assembly instructions. Pass CFLAGS="-g -O2
+  *     -mcpu=power" or CFLAGS="-g -O2 -mcpu=powerpc" to ake' to work
+  *     around this. (Choose the form that is appropriate for your system;
+  *     if you're unsure which processor type you have, try running
+  *     config.guess from the GMP top level directory.)
+  *   * A bug in mpz_probab_prime_p makes it work unreliably for numbers <
+  *     4. Apply this patch to mpz/pprime_p.c to fix the bug.
+  * * Update debian/control to reflect that GNU MP is covered by the LGPL,
+  *   not the GPL (fixes: bug#21326).
+  * * Build libgmp2.so with -fPIC (fixes: bug#17746, bug#20022).
+  * * Fix make check to run with a libgmp2.a; run make check during build.
+  *
+  * In addition to the above patches, the following changes were made:
+  *
+  * Renamed the package libgmp2, making it conflict with those replaced.
+  *                                         fixes: #28923, #28924
+  * Remove both debian/file* and debian/substvars* in clean tag. fixes: #32323
+  * provide generic links in libgmp2-dev for header files, libgmp.a, and
+  *    libgmp.so. Fixes: #25760, #31309
+  * Applied the ARM patches delivered by Jim Pick. Fixes: #33740
+  * Removed -Wl from makefile.in to conform to policy.
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  4 Apr 1999 22:16:41 -0400
+
+gmp2 (2.0.2-6) unstable; urgency=low
+
+  * Removed: Replaces, Conflicts, and Provides, gmp
+  * Modified info files to reflect the new name: removes last overlap
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun,  8 Mar 1998 17:27:07 -0500
+
+gmp2 (2.0.2-5) unstable; urgency=low
+
+  * Changed linking from static to dynamic, fixes bug#16530, 14345
+  * Added dependency information, fixes bug#14060, 15377
+  * Properly strip both static and shared libraries, fixes bug#15668
+  * Now Provides: gmp, fixes bug#16086
+  * gmp2-dev now only Depends: gmp2. Removed Replaces: gmp, Conflicts: gmp
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 18 Jan 1998 10:44:43 -0500
+
+gmp2 (2.0.2-4) unstable; urgency=low
+
+  * split package into gmp2 and gmp2-dev...was gmp
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sat, 22 Nov 1997 18:43:32 -0500
+
+gmp (2.0.2-3) unstable stable; urgency=low
+
+  * Added gmp-mparam.h to /usr/include, bug #9108
+  * Fixed copyright to reflect new license, bug #10739
+  * Added missing info files to installation, bug #10163
+  * Added changelog.Debian.gz and changelog.gz to /usr/doc/gmp
+
+ -- Dale Scheetz <dwarf@polaris.net>  Wed, 25 Jun 1997 14:47:17 -0400
+
+gmp (2.0.2-2) unstable frozen; urgency=low
+
+  * Removed execute bit from libgmp.a and so lib permissions.
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sat, 26 Apr 1997 18:03:49 -0400
+
+gmp (2.0.2-1) unstable; urgency=high
+
+  * Upgraded to new upstream source
+
+ -- Dale Scheetz <dwarf@polaris.net>  Sun, 16 Mar 1997 20:48:20 -0500
+
+gmp (1.3.2-8) unstable; urgency=low
+
+  * bug#6999 fixed, removed executable flag from docs.
+
+ -- Dale Scheetz <dwarf@polaris.net>  Tue, 4 Feb 1997 11:12:07 -0500
+
+gmp (1.3.2-7) unstable; urgency=low
+
+  * bug#6825 fixed .shlibs to use package name instead of library name.
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu, 30 Jan 1997 09:48:30 -0500
+
+gmp (1.3.2-6) unstable; urgency=low
+
+  * added shlibs to debian/tmp/DEBIAN
+
+ -- Dale Scheetz <dwarf@polaris.net>  Thu, 14 Nov 1996 15:35:34 -0500
+
+gmp (1.3.2-5) unstable; urgency=low
+
+  * fixed debian/rules to get so numbers from the changelog
+
+ -- Dale Scheetz <dwarf@polaris.net>  Fri, 27 Sep 1996 11:34:36 -0400
+
+gmp (1.3.2-4) unstable; urgency=low
+
+  * removed log files from source files to "fix" the diff.
+
+ -- Dale Scheetz <dwarf@polaris.net>  Fri, 20 Sep 1996 09:36:18 -0400
+
+gmp (1.3.2-3) unstable; urgency=low
+
+  * added shared libraries
+  * converted to new source format
+
+ -- Dale Scheetz <dwarf@polaris.net>  Tue, 10 Sep 1996 22:43:15 -0400
+
+gmp (1.3.2-2) - dcs
+
+  * Rebuild as ELF
+  * New package maintainer: Dale Scheetz <dwarf@polaris.net>
+
+gmp (1.3.2-1)
+
+  * Initial Debian release.
+
+ -- Ian Jackson <iwj10@cus.cam.ac.uk>  Sat, 29 Jul 1995 03:20:19 +0100
+
--- gmp4-4.3.2+dfsg.orig/debian/rules
+++ gmp4-4.3.2+dfsg/debian/rules
@@ -0,0 +1,245 @@
+#!/usr/bin/make -f
+
+ORIG_SRC_VERSION = 4.3.2
+
+include /usr/share/quilt/quilt.make
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  JOBSFLAG = -j$(NUMJOBS)
+endif
+
+DEB_HOST_ARCH  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+export DEB_HOST_GNU_TYPE  := $(subst i386,i486, $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE))
+export DEB_BUILD_GNU_TYPE := $(subst i386,i486, $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE))
+
+MAKE_CHECK = : disabled make check
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+  ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+    MAKE_CHECK = $(MAKE) check
+  endif
+endif
+
+export CFLAGS = -Wall -g -D_REENTRANT
+export LDFLAGS = -Wl,-Bsymbolic-functions
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CFLAGS += -O0
+else
+  CFLAGS += -O3
+endif
+
+lib32dir = usr/lib32
+lib64dir = usr/lib64
+
+
+confflags = --prefix=/usr --enable-cxx --enable-mpbsd
+
+ifneq (,$(filter $(DEB_HOST_ARCH), amd64 kfreebsd-amd64 lpia))
+  confflags += --disable-fat
+else
+  confflags += --enable-fat
+endif
+
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+  AR = ar
+  confflags_build += --build $(DEB_BUILD_GNU_TYPE)
+else
+  AR = $(DEB_HOST_GNU_TYPE)-ar
+  confflags_build += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+endif
+
+ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 ppc64 kfreebsd-amd64))
+  EXTRA_INSTALL=install32
+  m32=-m32
+  confflags32 = ABI=32 $(confflags) $(confflags_build) --libdir=/${lib32dir}
+endif
+
+ifneq (,$(findstring $(DEB_HOST_ARCH), powerpc))
+  EXTRA_INSTALL=install64
+  m64=-m64
+  confflags64_build = --build $(DEB_BUILD_GNU_TYPE) --host powerpc64-gnu-linux
+  confflags64 = ABI=mode64 NM=nm $(confflags) $(confflags64_build) --libdir=/${lib64dir}
+  CC64 = gcc $(m64)
+  CXX64 = g++ $(m64)
+  MAKE_CHECK = : disabled make check
+endif
+
+CC   = $(DEB_HOST_GNU_TYPE)-gcc
+CC32 = $(DEB_HOST_GNU_TYPE)-gcc $(m32)
+CC64 = $(DEB_HOST_GNU_TYPE)-gcc $(m64)
+
+CXX   = $(DEB_HOST_GNU_TYPE)-g++
+CXX32 = $(DEB_HOST_GNU_TYPE)-g++ $(m32)
+CXX64 = $(DEB_HOST_GNU_TYPE)-g++ $(m64)
+
+confflags += $(confflags_build)
+
+
+get-orig-source: gmp-$(ORIG_SRC_VERSION).tar.gz
+	tar xzf gmp-$(ORIG_SRC_VERSION).tar.gz
+	mv gmp-$(ORIG_SRC_VERSION) gmp-$(ORIG_SRC_VERSION)+dfsg
+	mkdir gmp-doc-$(ORIG_SRC_VERSION)
+	mv gmp-$(ORIG_SRC_VERSION)+dfsg/doc/ gmp-doc-$(ORIG_SRC_VERSION)/
+	mkdir gmp-$(ORIG_SRC_VERSION)+dfsg/doc
+	touch gmp-$(ORIG_SRC_VERSION)+dfsg/doc/Makefile.am
+	touch gmp-$(ORIG_SRC_VERSION)+dfsg/doc/Makefile.in
+	cd gmp-$(ORIG_SRC_VERSION)+dfsg/ && autoreconf --force --install
+	tar czf gmp_$(ORIG_SRC_VERSION)+dfsg.orig.tar.gz gmp-$(ORIG_SRC_VERSION)+dfsg
+	tar czf gmp-doc_$(ORIG_SRC_VERSION).orig.tar.gz gmp-doc-$(ORIG_SRC_VERSION)
+	rm -rf gmp-$(ORIG_SRC_VERSION)+dfsg gmp-doc-$(ORIG_SRC_VERSION) gmp-$(ORIG_SRC_VERSION).tar.gz
+
+gmp-$(ORIG_SRC_VERSION).tar.gz:
+	wget ftp://ftp.gnu.org/gnu/gmp/gmp-$(ORIG_SRC_VERSION).tar.gz
+
+configure: patch configure-stamp
+configure-stamp:
+	mkdir -p build
+	cd build && ../configure $(confflags) \
+	    AR=$(AR) CC="$(CC)" CFLAGS="$(CFLAGS)" \
+	    CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)"
+	CC="$(DEB_HOST_GNU_TYPE)-gcc" sh debian/fix-gmp-h.sh build
+	touch $@
+
+configure32: patch configure32-stamp
+configure32-stamp:
+	mkdir -p build32
+	cd build32 && ../configure $(confflags32) \
+	    AR=$(AR) CC="$(CC32)" CFLAGS="$(CFLAGS)" \
+	    CXX="$(CXX32)" CXXFLAGS="$(CXXFLAGS)" 
+	CC="$(CC32)" sh debian/fix-gmp-h.sh build32
+	touch $@
+
+configure64: patch configure64-stamp
+configure64-stamp:
+	mkdir -p build64
+	cd build64 && ../configure $(confflags64) \
+	    AR=$(AR) CC="$(CC64)" CFLAGS="$(CFLAGS)" \
+	    CXX="$(CXX64)" CXXFLAGS="$(CXXFLAGS)" 
+	CC="$(CC64)" sh debian/fix-gmp-h.sh build64
+	touch $@
+
+build: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	$(MAKE) $(JOBSFLAG) -C build
+	$(MAKE_CHECK) -C build
+	touch $@
+
+build32-stamp: configure32-stamp
+	dh_testdir
+	$(MAKE) $(JOBSFLAG) -C build32
+	$(MAKE_CHECK) -C build32
+	touch $@
+
+build64-stamp: configure64-stamp
+	dh_testdir
+	$(MAKE) $(JOBSFLAG) -C build64
+	$(MAKE_CHECK) -C build64
+	touch $@
+
+clean: clean-patched unpatch
+
+clean-patched:
+	dh_testdir
+	dh_testroot
+	rm -rf build build-stamp
+	rm -rf build32 build32-stamp
+	rm -rf build64 build64-stamp
+	dh_clean
+
+install-prep:
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
+install: build-stamp install-prep
+	$(MAKE) DESTDIR=`pwd`/debian/tmp -C build install
+
+	dh_install -plibgmp3c2 usr/lib/libgmp.so.*
+	dh_install -plibgmp3c2 usr/lib/libmp.so.*
+
+	dh_install -plibgmpxx4ldbl usr/lib/libgmpxx.so.*
+
+	dh_install -plibgmp3-dev usr/lib/lib*.so
+	dh_install -plibgmp3-dev usr/lib/lib*.a
+	dh_install -plibgmp3-dev usr/lib/lib*.la
+	dh_install -plibgmp3-dev usr/include
+	dh_install -plibgmp3-dev -Xgmp-mparam.h build/gmp*.h usr/include
+
+	# Install upstream ChangeLog, AUTHORS, NEWS, and README only in -dev package
+	dh_installchangelogs -plibgmp3-dev
+	dh_installdocs -plibgmp3-dev AUTHORS NEWS README
+
+install32: build32-stamp install-prep
+	$(MAKE) DESTDIR=`pwd`/debian/tmp -C build32 install
+
+	dh_install -plib32gmp3 ${lib32dir}/libgmp.so.*
+	dh_install -plib32gmp3 ${lib32dir}/libmp.so.*
+
+	dh_install -plib32gmpxx4 ${lib32dir}/libgmpxx.so.*
+
+	dh_install -plib32gmp3-dev ${lib32dir}/lib*.so
+	dh_install -plib32gmp3-dev ${lib32dir}/lib*.a
+	dh_install -plib32gmp3-dev ${lib32dir}/lib*.la
+	dh_install -plib32gmp3-dev -Xgmp-mparam.h -Xgmp.h build32/gmp*.h usr/include
+
+install64: build64-stamp install-prep
+	$(MAKE) DESTDIR=`pwd`/debian/tmp -C build64 install
+
+	dh_install -plib64gmp3 ${lib64dir}/libgmp.so.*
+	dh_install -plib64gmp3 ${lib64dir}/libmp.so.*
+
+	dh_install -plib64gmpxx4 ${lib64dir}/libgmpxx.so.*
+
+	dh_install -plib64gmp3-dev ${lib64dir}/lib*.so
+	dh_install -plib64gmp3-dev ${lib64dir}/lib*.a
+	dh_install -plib64gmp3-dev ${lib64dir}/lib*.la
+	dh_install -plib64gmp3-dev -Xgmp-mparam.h -Xgmp.h build64/gmp*.h usr/include
+
+
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+binary-common:
+	dh_testdir
+	dh_testroot
+	# User lower compatibility to avoid installing upstream changelog in all packages
+	DH_COMPAT=6 dh_installchangelogs
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_lintian
+	dh_strip
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture independant packages using the common target.
+binary-indep: build install
+	 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build install $(EXTRA_INSTALL)
+	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	make -f debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary-common binary install install-prep
--- gmp4-4.3.2+dfsg.orig/debian/libgmp3.prerm
+++ gmp4-4.3.2+dfsg/debian/libgmp3.prerm
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Cruft removal
+if [ \( "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "purge" \) ]; then 
+  if [ -L /usr/doc/libgmp3 ]; then
+    rm -f /usr/doc/libgmp3
+  fi
+  if [ -L /usr/info/gmp3.info.gz ]; then
+    rm -f /usr/info/gmp3.info.gz
+  fi
+  if [ -L /usr/info/gmp3.info ]; then
+    rm -f /usr/info/gmp3.info
+  fi
+fi
+
+
+#DEBHELPER#
--- gmp4-4.3.2+dfsg.orig/debian/gmp.h
+++ gmp4-4.3.2+dfsg/debian/gmp.h
@@ -0,0 +1,68 @@
+/* Definitions for GNU multiple precision functions.   -*- mode: c -*-
+
+Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
+2004 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
+
+The GNU MP Library 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.
+
+The GNU MP Library 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 the GNU MP Library; see the file COPYING.LIB.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+MA 02111-1307, USA. */
+
+/*
+ * This gmp.h is a wrapper include file for the original gmp.h, which has been
+ * renamed to gmp-<arch>.h. There are conflicts for the original gmp.h on
+ * multilib systems, which result from arch-specific configuration options.
+ * Please do not use the arch-specific file directly.
+ *
+ * Copyright (C) 2006 Red Hat, Inc.
+ * Thomas Woerner <twoerner@redhat.com>
+ */
+
+#ifdef gmp_wrapper_h
+#error "gmp_wrapper_h should not be defined!"
+#endif
+#define gmp_wrapper_h
+
+#if defined(__arm__)
+#include "gmp-arm.h"
+#elif defined(__avr32__)
+#include "gmp-avr32.h"
+#elif defined(__i386__)
+#include "gmp-i386.h"
+#elif defined(__ia64__)
+#include "gmp-ia64.h"
+#elif defined(__hppa__)
+#include "gmp-hppa.h"
+#elif defined(__powerpc64__)
+#include "gmp-ppc64.h"
+#elif defined(__mips__)
+#include "gmp-mips.h"
+#elif defined(__powerpc__)
+#include "gmp-ppc.h"
+#elif defined(__s390__)
+#include "gmp-s390.h"
+#elif defined(__sparc__)
+#include "gmp-sparc.h"
+#elif defined(__x86_64__)
+#include "gmp-x86_64.h"
+#elif defined(__alpha__)
+#include "gmp-alpha.h"
+#elif defined(__sh__)
+#include "gmp-sh.h"
+#else
+#error "The gmp-dev package is not usable with the architecture."
+#endif
+
+#undef gmp_wrapper_h
--- gmp4-4.3.2+dfsg.orig/debian/patches/series
+++ gmp4-4.3.2+dfsg/debian/patches/series
@@ -0,0 +1 @@
+# No patches at present.
