--- libpano13-2.9.14.orig/debian/libpano13-bin.docs
+++ libpano13-2.9.14/debian/libpano13-bin.docs
@@ -0,0 +1 @@
+doc/Optimize.txt
--- libpano13-2.9.14.orig/debian/README.source
+++ libpano13-2.9.14/debian/README.source
@@ -0,0 +1,4 @@
+This debian package is using cdbs with quilt as patch management system.
+
+debian/rules patch produces a patched source directory, see quilt's
+documentation for how to manage/add patches.
--- libpano13-2.9.14.orig/debian/libpano13-bin.install
+++ libpano13-2.9.14/debian/libpano13-bin.install
@@ -0,0 +1,2 @@
+usr/bin/*
+usr/share/man/man1/*.1
--- libpano13-2.9.14.orig/debian/compat
+++ libpano13-2.9.14/debian/compat
@@ -0,0 +1 @@
+5
--- libpano13-2.9.14.orig/debian/libpano13-dev.install
+++ libpano13-2.9.14/debian/libpano13-dev.install
@@ -0,0 +1,3 @@
+usr/include/*
+usr/lib/lib*.a
+usr/lib/lib*.so
--- libpano13-2.9.14.orig/debian/TODO
+++ libpano13-2.9.14/debian/TODO
@@ -0,0 +1,14 @@
+TODO for libpano13:
+-------------------
+
+  * Check whether relibtoolizing would help getting rid of the rpath
+    set on some architectures, instead of using chrpath.
+  * [Upstream#1861166] Needed LIBS="-lm" option for ./configure.
+  * [Upstream#1861171] Ship a .pc file.
+  * [BTS#347650] Additional linking even with -Wl,--as-needed because
+    of libtool's reordering its arguments. Keep an eye on this bug so
+    as to drop the workaround once the bug is closed (if ever):
+     - debian/patches/10_workaround_libtool_link_as_needed_bug.
+  * Eventually move GPLv2+ to GPL-2+.
+
+ -- Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>  Tue, 25 Dec 2007 23:02:45 +0100
--- libpano13-2.9.14.orig/debian/watch
+++ libpano13-2.9.14/debian/watch
@@ -0,0 +1,5 @@
+version=3
+
+opts=dversionmangle=s/\.dfsg$//,\
+uversionmangle=s/_rc/~rc/;s/_beta/~beta/ \
+http://sf.net/panotools/libpano13-(.*)\.tar\.gz
--- libpano13-2.9.14.orig/debian/libpano13-1.install
+++ libpano13-2.9.14/debian/libpano13-1.install
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
--- libpano13-2.9.14.orig/debian/control
+++ libpano13-2.9.14/debian/control
@@ -0,0 +1,58 @@
+Source: libpano13
+Section: libs
+Priority: optional
+Maintainer: Debian PhotoTools Maintainers <pkg-phototools-devel@lists.alioth.debian.org>
+Uploaders: Cyril Brulebois <kibi@debian.org>, Florent Bayle <fbayle@bigfoot.com>, Andreas Metzler <ametzler@debian.org>
+Build-Depends: debhelper (>= 5), cdbs, quilt, libpng12-dev, libjpeg62-dev, libtiff4-dev, autotools-dev, chrpath
+Standards-Version: 3.8.3
+Vcs-Browser: http://git.debian.org/?p=pkg-phototools/libpano.git
+Vcs-Git: git://git.debian.org/git/pkg-phototools/libpano.git
+Homepage: http://panotools.sourceforge.net/
+
+Package: libpano13-dev
+Section: libdevel
+Architecture: any
+Depends: libpano13-1 (= ${binary:Version}), ${misc:Depends}
+Description: panorama tools library development files
+ This package contains the panoramatools library. It provides basic
+ algorithmic tools to generate, edit and transform many kinds of
+ panoramic images.
+ .
+ This package holds static libraries and headers needed by developers
+ who wish to use libpano13 in their programs.
+
+Package: libpano13-1
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: libpano13-bin
+Description: panorama tools library
+ This package contains the panoramatools library. It provides basic
+ algorithmic tools to generate, edit and transform many kinds of
+ panoramic images.
+ .
+ Panorama Tools was originally created by Professor Helmut Dersch of the
+ University of Applied Sciences Furtwangen. Professor Dersch's site no
+ longer has links to download the tools, which is why this panotools
+ sourceforge project exists.
+
+Package: libpano13-bin
+Section: graphics
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Conflicts: libpano12-bin
+Replaces: libpano12-bin
+Description: panorama tools utilities
+ This package contains the following tools, all part of the Panorama Tools
+ library, and supposed to make it easy to work with panoramic images:
+  * panoinfo    - List details about the libpano13 library
+  * PTblender   - Colour and brightness correction of panoramas
+  * PTcrop      - Crop TIFF images
+  * PTinfo      - Display information about a panotools-generated image
+  * PTmasker    - Compute stitching masks
+  * PTmender    - Replacement for PTStitcher
+  * PToptimizer - Wrapper around control point optimization routines
+  * PTroller    - Merge several images into a single one
+  * PTtiff2psd  - Convert a set of TIFF files into a Photoshop PSD file
+  * PTtiffdump  - Compare two TIFF images
+  * PTuncrop    - Uncrop TIFF images
--- libpano13-2.9.14.orig/debian/copyright
+++ libpano13-2.9.14/debian/copyright
@@ -0,0 +1,127 @@
+This package is based on the libpano12 package, debianized by Florent
+Bayle <fbayle@bigfoot.com> on Fri, 29 Apr 2005 19:01:28 +0200.
+
+It was downloaded from <http://sourceforge.net/projects/panotools/>.
+
+Upstream Authors and Copyright Holders:
+
+    Daniel M. German <dmgerman@uvic.ca>, 2005-2006
+    Jim Watters <jimwatters@rogers.com>, 2003-2007
+    Bruno Postle <bruno@postle.net>, 2006
+    Max Lyons <maxlyons@tawbaware.com>, 2006
+
+
+Other Authors:
+
+    Helmut Dersch <der@fh-furtwangen.de>, 1998-2006
+        Author of PTStitcher (licensed under the same terms), from
+        which some parts of code are borrowed.
+    Tom Lane, Marti Maria
+        See jpegicc.* below.
+    Kevin Kratzke
+    Rik Littlefield
+    Fulvio Senore
+    Thomas Rauscher
+    Pablo d'Angelo
+    Bret McKee
+    Robert Platt
+
+
+Copyright:
+
+    This program 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 program is distributed in the hope that it will be useful,
+    but WITHOUTANY 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 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 file.
+
+
+Some parts of the software are derived from other sources, which are
+distributed under different copyrights. These are:
+
+(1) The public domain Levenberg-Marquardt solver of the Argonne
+    National Laboratories MINPACK mathematical library, C translation
+    by Steve Moshier (file lmdif.c).
+
+(2) Fast fourier transformation (fftn.c, fftn.h), code by:
+    RC Singleton, Stanford Research Institute, Sept. 1968
+    Copyright MJ Olesen, Queen's University at Kingston, 1995-97.
+
+Licence:
+
+    Permission to use, copy, modify, and distribute this software for
+    any purpose without fee is hereby granted, provided that this
+    entire notice is included in all copies of any software which is
+    or includes a copy or modification of this software and in all
+    copies of the supporting documentation for such software.
+
+    THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
+    IMPLIED WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR QUEEN'S
+    UNIVERSITY AT KINGSTON MAKES ANY REPRESENTATION OR WARRANTY OF ANY
+    KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS
+    FITNESS FOR ANY PARTICULAR PURPOSE.
+
+    All of which is to say that you can do what you like with this
+    source code provided you don't try to sell it as your own and you
+    include an unaltered copy of this message (including the
+    copyright).
+
+    It is also implicitly understood that bug fixes and improvements
+    should make their way back to the general Internet community so
+    that everyone benefits.
+
+
+
+Files: jpegicc.c, jpegicc.h:
+Copyright: Tom Lane
+           Marti Maria
+License: GPL-2+
+ | This source file was originally part of the LCMS package. I asked
+ | Marti for permission to change its license from MIT to GPL (Aug 4,
+ | 2006). -- Daniel German
+
+
+
+Files: f2c.h
+Copyright: © 1990-1995 AT&T Bell Laboratories and Bellcore
+License:
+ | Permission to use, copy, modify, and distribute this software
+ | and its documentation for any purpose and without fee is hereby
+ | granted, provided that the above copyright notice appear in all
+ | copies and that both that the copyright notice and this
+ | permission notice and warranty disclaimer appear in supporting
+ | documentation, and that the names of AT&T Bell Laboratories or
+ | Bellcore or any of their entities not be used in advertising or
+ | publicity pertaining to distribution of the software without
+ | specific, written prior permission.
+ |
+ | AT&T and Bellcore disclaim all warranties with regard to this
+ | software, including all implied warranties of merchantability
+ | and fitness.  In no event shall AT&T or Bellcore be liable for
+ | any special, indirect or consequential damages or any damages
+ | whatsoever resulting from loss of use, data or profits, whether
+ | in an action of contract, negligence or other tortious action,
+ | arising out of or in connection with the use or performance of
+ | this software.
+
+
+
+Files: rgbe.c, rgbe.h
+Copyright: © 1995 Bruce Walter <bjw@graphics.cornell.edu>
+License:
+ | The license of these files has been clarified by Bruce Walter during
+ | a private email conversation.
+ |
+ | These files are public domain.
--- libpano13-2.9.14.orig/debian/changelog
+++ libpano13-2.9.14/debian/changelog
@@ -0,0 +1,149 @@
+libpano13 (2.9.14-2~bpo50+1) lenny-backports; urgency=low
+
+  * Rebuild for lenny-backports.
+  * Upload to bpo since this is a reverse dependency of hugin 0.8.0.
+
+ -- Andreas Metzler <ametzler@debian.org>  Mon, 14 Sep 2009 13:22:42 +0200
+
+libpano13 (2.9.14-2) unstable; urgency=low
+
+  * Stop shipping la file in -dev package. (Squeeze release goal).
+  * debian/patches/20_libpano13+kbsd.diff - Fix FTBFS on GNU/kFreeBSD. Patch
+    by Cyril Brulebois. Closes: #543998
+
+ -- Andreas Metzler <ametzler@debian.org>  Sat, 29 Aug 2009 14:36:20 +0200
+
+libpano13 (2.9.14-1) unstable; urgency=low
+
+  * Upload to unstable.
+  * [Lintian] Fix typo in debian control: s/algorithmical/algorithmic/.
+  * Standards-Version: 3.8.2, no changes required.
+  * Improve on watchfile to handle rc and beta versions.
+
+ -- Andreas Metzler <ametzler@debian.org>  Sun, 09 Aug 2009 14:01:24 +0200
+
+libpano13 (2.9.14~rc1-1) experimental; urgency=low
+
+  * New upstream prerelease.
+    + New soname due to ABI breakage (new member in public struct). Change
+      package name of library package.
+    + Does not contain non-free files PixMap.c PixMap.h, no need for .dfsg
+      version anymore. Also does away with the need for a complex
+      get-orig-source
+      target.
+    + debian/manpages/* now shipped in upstream-tarball. Adapt build-system
+      accordingly.
+  * [lintian] Add ${misc:Depends}.
+  * Standards version 3.8.1.
+    + [debian/control] Add Homepage field.
+    + Add rudimentary debian/README.source, basically pointing to quilt
+      documentation.
+
+ -- Andreas Metzler <ametzler@debian.org>  Sun, 03 May 2009 19:56:34 +0200
+
+libpano13 (2.9.12.dfsg-2) unstable; urgency=low
+
+  * Drop Java support altogether (Closes: #477884). While checking that
+    bugreport, it appeared that “HasJava” is only used in a single source
+    file, which happens to be commented out.
+     - debian/control: Drop libgcj-dev from Build-Depends.
+     - debian/rules: Turn “--with-java” into “--without-java”.
+     - debian/rules: Not bumping shlibs since no symbols changed (as
+       expected given the above explanation).
+  * Update my mail address in Uploaders.
+
+ -- Cyril Brulebois <kibi@debian.org>  Sat, 26 Apr 2008 12:29:49 +0200
+
+libpano13 (2.9.12.dfsg-1) unstable; urgency=low
+
+  * Initial release (Closes: #433261), based on libpano12/2.8.6-0.1.
+  * Repack because of the license of PixMap.{c,h}. These files seem to be
+    needed only on Mac anyway:
+     - Add a get-orig-source target to debian/rules.
+     - Add version mangling to debian/watch.
+  * The following glitches have been forwarded upstream so that these
+    files will get proper copyright and license statements in further
+    releases:
+     - Copyright years are missing for jpegicc.{c,h}.
+     - Copyright and license are missing for f2c.h. This file is available
+       in the libf2c2 source package, and its copyright file has been used
+       to complete this one.
+     - Copyright and license are missing for rgbe.{c,h}. These files are
+       available in the enblend source package, and its copyright file has
+       been used to complete this one. The copyright by Bruce Walter is
+       the original copyright notice, these files are now public domain.
+  * Move from libpano12 to libpano13:
+     - Update debian/copyright.
+     - Update debian/watch, get rid of “debian uupdate”.
+     - Update package names in debian/control, and clear the following
+       fields: Provides, Conflicts, Replaces.
+     - Add  “Conflicts: libpano12-bin” and “Replaces: libpano12-bin” to
+       libpano13-bin.
+     - Rename debian/libpano12* into debian/libpano13*.
+     - Update debian/libpano13-bin.install:
+        - Rename pano12info into panoinfo.
+        - Rename PTOptimizer into PToptimizer.
+     - Update debian/libpano13-bin.manpages accordingly.
+     - Rename the manpages accordingly.
+     - Update debian/manpages/panoinfo.1.
+     - Update debian/manpages/PToptimizer.1.
+  * debian/rules adjustments:
+     - Delete unneeded variable declarations (major, version).
+     - Delete useless comments.
+     - Delete trailing spaces.
+  * Move Maintainer to the pkg-phototools team, add Florent Bayle and
+    myself to Uploaders.
+  * Bump Standards-Version to 3.7.3 (no change needed).
+  * Add Vcs-Git and Vcs-Browser. Note that both libpano12 and libpano13
+    are maintained within the same libpano.git repository.
+  * Bump debhelper compatibility from 4 to 5. Changes needed:
+     - Remove “usr/lib/pkgconfig/*” from debian/libpano13-dev.install
+       since “--fail-missing” is now the default behaviour of dh_install.
+  * Use “LDFLAGS="-Wl,--as-needed"” on the ./configure line to avoid extra
+    linking.
+  * To achieve that, it is needed to patch config/ltmain.sh (libtool)
+    because of very long-standing (and will-be-very-long-standing) libtool
+    bug, see #347650:
+     - Add quilt as Build-Depends, and to debian/rules.
+     - Add 10_workaround_libtool_link_as_needed_bug to workaround libtool
+       bug.
+     - Add a TODO item about that bug, basically “keep an eye on it in
+       case it ever gets fixed”.
+  * Since that might break things sometimes, add “-Wl,-z,defs” before
+    “-Wl,--as-needed”, so as to catch undefined references as early as
+    possible in the build process. That done, it appears that “-lm” is
+    missing, thus: add “LIBS="-lm"” on the ./configure line.
+  * Remove debian/*.dirs files, since they aren't needed.
+  * Clear the rpath set on some architectures (e.g. amd64) instead of
+    relibtoolizing (at least at the moment):
+     - Add chrpath to Build-Depends.
+     - Add “chrpath -d” calls on debian/tmp/usr/{bin/*,lib/*.so} after
+       the “make install” call.
+     - Add a TODO item about that.
+  * Switch from plain debhelper to cdbs. The build is conventional enough
+    to drop lengthy makefiles in favour of shorter ones:
+     - Add cdbs to Build-Depends.
+     - Add autotools-dev as well, to get config.{guess,sub} updated during
+       the build.
+     - Use only some includes and variables in debian/rules, but keep the
+       additional get-orig-source target.
+     - Drop debian/libpano13-0.docs, cdbs is smart enough to install those
+       files.
+     - A single trick is needed: dh_install is called for each binary
+       when using debhelper.mk, which makes the use of “--*-missing” a
+       bit tricky. That's why a hook between “make install” and “dh_*”
+       is needed, removing the RPATH's as well running dh_install with
+       one of the “--*-missing” option. This is cdbs's #461368.
+  * Ship all binaries, using a wildcard in debian/libpano13-bin.install.
+  * Update the long description of libpano13-bin accordingly, listing all
+    binaries along with an oneliner description for each.
+  * Write manpages for all binaries, in the perlpod format. Generate them
+    using pod2man at build-time. Ship them through libpano13.manpages, by
+    using a wildcard.
+  * Get rid of strange (strictly-versioned) interdependencies, leading to
+    a dependency loop:
+     - Remove “Suggests: libpano13-dev” from libpano13-0.
+     - Downgrade “Recommends: libpano13-bin” to a “Suggests:”, still in
+       libpano13-0.
+
+ -- Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>  Thu, 24 Jan 2008 23:37:28 +0100
--- libpano13-2.9.14.orig/debian/rules
+++ libpano13-2.9.14/debian/rules
@@ -0,0 +1,54 @@
+#!/usr/bin/make -f
+
+# We don't use tarball.mk but there's a .tgz in the way
+DEB_TARBALL=
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+include /usr/share/cdbs/1/class/autotools.mk
+
+
+# For the repack: package name, mangled upstream version, non-free files
+PACKAGE=libpano13
+VERSION=$(shell dpkg-parsechangelog | perl -ne 'print "$$1\n" if (/^Version: (.*?)(?:\.dfsg)?\-.*?$$/)')
+
+
+# --{list,fail}-missing don't make sense when dh_install is called for each
+# package rather than once for all. See the hook below, only used to check
+# the list of installed files. This is cdbs's #461368.
+DEB_DH_INSTALL_ARGS=--autodest --sourcedir=debian/tmp
+
+# What to pass to ./configure
+DEB_CONFIGURE_EXTRA_FLAGS= \
+	--prefix=/usr \
+	--enable-shared \
+	--enable-static \
+	--with-jpeg \
+	--with-png  \
+	--with-tiff \
+	--with-zlib \
+	--without-java
+
+# Could be merged into the former, but cleaner this way
+DEB_CONFIGURE_SCRIPT_ENV += \
+	LDFLAGS="-Wl,-z,defs -Wl,--as-needed" \
+	LIBS="-lm"
+
+
+# Between "make install" and "dh_*" calls
+common-install-arch::
+	# Clear the rpath set on some architectures (e.g. amd64)
+	chrpath -d $(CURDIR)/debian/tmp/usr/bin/*
+	chrpath -d $(CURDIR)/debian/tmp/usr/lib/*.so
+
+	rm -f $(CURDIR)/debian/tmp/usr/lib/*.la
+
+	# Check the list of installed files, see the comment above the
+	# DEB_DH_INSTALL_ARGS declaration
+	dh_install --fail-missing $(DEB_DH_INSTALL_ARGS)
+
+# Build the DFSG-free source tarball
+get-orig-source:
+	# Download
+	uscan --force-download --rename
+
--- libpano13-2.9.14.orig/debian/patches/20_libpano13+kbsd.diff
+++ libpano13-2.9.14/debian/patches/20_libpano13+kbsd.diff
@@ -0,0 +1,25 @@
+Author: Cyril Brulebois
+http://bugs.debian.org/543998
+
+--- a/configure
++++ b/configure
+@@ -19275,7 +19275,7 @@ case "${host_os}" in
+     HSYS=unknown
+     HCPU="${host_cpu}"
+ 	;;
+-  linux*)
++  linux*|k*bsd*)
+     PANO_WIN32_RESOURCE=
+     HSYS=linux
+     			case "${host_cpu}" in
+--- a/configure.ac
++++ b/configure.ac
+@@ -27,7 +27,7 @@ case "${host_os}" in
+     HSYS=unknown
+     HCPU="${host_cpu}"
+ 	;;
+-  linux*)
++  linux*|k*bsd*)
+     PANO_WIN32_RESOURCE=
+     HSYS=linux
+     dnl
--- libpano13-2.9.14.orig/debian/patches/series
+++ libpano13-2.9.14/debian/patches/series
@@ -0,0 +1,2 @@
+10_workaround_libtool_link_as_needed_bug
+20_libpano13+kbsd.diff
--- libpano13-2.9.14.orig/debian/patches/10_workaround_libtool_link_as_needed_bug
+++ libpano13-2.9.14/debian/patches/10_workaround_libtool_link_as_needed_bug
@@ -0,0 +1,30 @@
+--- a/config/ltmain.sh	2007-12-26 07:21:34.000000000 +0100
++++ b/config/ltmain.sh	2007-12-26 07:21:40.000000000 +0100
+@@ -1517,6 +1517,11 @@
+ 	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ 	;;
+ 
++      -Wl,--as-needed)
++	deplibs="$deplibs $arg"
++	continue
++	;;
++      
+       -Wl,*)
+ 	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ 	arg=
+@@ -1853,6 +1858,15 @@
+ 	lib=
+ 	found=no
+ 	case $deplib in
++	-Wl,--as-needed)
++	  if test "$linkmode,$pass" = "prog,link"; then
++	    compile_deplibs="$deplib $compile_deplibs"
++	    finalize_deplibs="$deplib $finalize_deplibs"
++	  else
++	    deplibs="$deplib $deplibs"
++	  fi
++	  continue
++	  ;;
+ 	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ 	  if test "$linkmode,$pass" = "prog,link"; then
+ 	    compile_deplibs="$deplib $compile_deplibs"
