--- flac-1.2.1.orig/debian/libflac-doc.doc-base.web
+++ flac-1.2.1/debian/libflac-doc.doc-base.web
@@ -0,0 +1,14 @@
+Document: libflac-doc-web
+Title: FLAC Project Documentation
+Author: Josh Coalson
+Abstract: This is the HTML version of the FLAC documentation,
+ which is more or less a mirror of the FLAC homepage. It provides instructions
+ for using the command-line flac and metaflac programs, descriptions of the
+ internal format of FLAC files, the goals of the FLAC project, Frequently Asked
+ Questions about FLAC, useful information for FLAC developers, and links to
+ other applications with FLAC support.
+Section: Sound
+
+Format: HTML
+Index: /usr/share/doc/libflac-doc/html/index.html
+Files: /usr/share/doc/libflac-doc/html/*.html
--- flac-1.2.1.orig/debian/libflac-doc.doc-base.api
+++ flac-1.2.1/debian/libflac-doc.doc-base.api
@@ -0,0 +1,10 @@
+Document: libflac-doc-api
+Title: FLAC Library API Reference
+Author: Josh Coalson
+Abstract: This is the online API reference for the libFLAC, libFLAC++,
+ libOggFLAC, and libOggFLAC++ libraries, generated by Doxygen.
+Section: Programming
+
+Format: HTML
+Index: /usr/share/doc/libflac-doc/html/api/index.html
+Files: /usr/share/doc/libflac-doc/html/api/*.html
--- flac-1.2.1.orig/debian/docs
+++ flac-1.2.1/debian/docs
@@ -0,0 +1 @@
+README
--- flac-1.2.1.orig/debian/watch
+++ flac-1.2.1/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://sf.net/flac/flac-([0-9\.]*)\.tar\.gz
--- flac-1.2.1.orig/debian/libflac++6.install
+++ flac-1.2.1/debian/libflac++6.install
@@ -0,0 +1 @@
+usr/lib/*/libFLAC++.so.*
--- flac-1.2.1.orig/debian/compat
+++ flac-1.2.1/debian/compat
@@ -0,0 +1 @@
+9
--- flac-1.2.1.orig/debian/gbp.conf
+++ flac-1.2.1/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+pristine-tar = True
--- flac-1.2.1.orig/debian/README.source
+++ flac-1.2.1/debian/README.source
@@ -0,0 +1,5 @@
+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.
+
+For more information about quilt, see /usr/share/doc/quilt/README.source
--- flac-1.2.1.orig/debian/flac.install
+++ flac-1.2.1/debian/flac.install
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man
--- flac-1.2.1.orig/debian/libflac-dev.install
+++ flac-1.2.1/debian/libflac-dev.install
@@ -0,0 +1,5 @@
+usr/lib/*/libFLAC.a
+usr/lib/*/libFLAC.so
+usr/include/FLAC
+usr/lib/*/pkgconfig/flac.pc
+usr/share/aclocal/libFLAC.m4
--- flac-1.2.1.orig/debian/clean
+++ flac-1.2.1/debian/clean
@@ -0,0 +1,2 @@
+man/flac.1
+man/metaflac.1
--- flac-1.2.1.orig/debian/copyright
+++ flac-1.2.1/debian/copyright
@@ -0,0 +1,65 @@
+This package was debianized by Matt Zimmerman <mdz@debian.org> on
+Wed, 17 Jan 2001 14:52:43 -0500.
+
+It was downloaded from http://flac.sourceforge.net/
+
+Upstream Author: Josh Coalson
+
+Copyright and Licenses (from README):
+
+/* FLAC - Free Lossless Audio Codec
+ * Copyright (C) 2001,2002,2003,2004,2005,2006,2007  Josh Coalson
+ *
+ * This file is part the FLAC project.  FLAC is comprised of several
+ * components distributed under difference licenses.  The codec libraries
+ * are distributed under Xiph.Org's BSD-like license (see the file
+ * COPYING.Xiph in this distribution).  All other programs, libraries, and
+ * plugins are distributed under the LGPL or GPL (see COPYING.LGPL and
+ * COPYING.GPL).  The documentation is distributed under the Gnu FDL (see
+ * COPYING.FDL).  Each file in the FLAC distribution contains at the top the
+ * terms under which it may be distributed.
+ *
+ * Since this particular file is relevant to all components of FLAC,
+ * it may be distributed under the Xiph.Org license, which is the least
+ * restrictive of those mentioned above.  See the file COPYING.Xiph in this
+ * distribution.
+ */
+
+Xiph.org's BSD-like License:
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ - Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ .
+ - Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ - Neither the name of the Xiph.org Foundation nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The Debian packaging is licensed under the terms of the GNU General
+Public License; either version 2 of the License, or
+(at your option) any later version.
+
+On Debian systems, the complete text of the GNU General
+Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+On Debian systems, the complete text of the GNU Free Documentation License
+can be found in "/usr/share/common-licenses/GFDL-1.2".
--- flac-1.2.1.orig/debian/changelog
+++ flac-1.2.1/debian/changelog
@@ -0,0 +1,656 @@
+flac (1.2.1-6.16.201403231559) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Sun, 23 Mar 2014 15:59:49 +0100
+
+flac (1.2.1-6) unstable; urgency=medium
+
+  * Fix "format not a string literal and no format arguments
+    [-Werror=format-security]" errors (Closes: #643377).
+
+ -- Fabian Greffrath <fabian+debian@greffrath.com>  Wed, 05 Oct 2011 14:26:47 +0200
+
+flac (1.2.1-5) unstable; urgency=low
+
+  * Team upload.
+
+  [ Steve Langasek ]
+  * Transition package to multiarch (Closes: #637582)
+
+ -- Alessio Treglia <alessio@debian.org>  Tue, 16 Aug 2011 12:55:20 +0200
+
+flac (1.2.1-4) unstable; urgency=low
+
+  [ Fabian Greffrath ]
+  * Convert patch tracking system from dpatch to quilt.
+  * Convert package to use dh7 with quilt and autotools-dev sequence
+    addons.
+  * Clean up debian/control and debian/flac.install.
+  * Remove unnecessary debian/fixrpath.
+  * Skip test suite, it was also skipped before.
+  * Bring back config.sub and config.guess from upstream branch.
+  * Improve debian/copyright.
+  * Remove special handling of CFLAGS for m68k.
+  * debian/patches/12_ac_config_macro_dir.patch: New patch, fixes
+    "undefined macro: AM_PATH_XMMS" and similar errors which cause
+    autoreconf to fail.
+  * Drop debian/patches/90_autoreconf.patch in favour of dh-autoreconf.
+  * Convert patch tracking system from dpatch to quilt.
+  * Convert package to use dh7 with quilt and autotools-dev sequence addons.
+  * Clean up debian/control and debian/flac.install.
+  * Remove unseless debian/fixrpath.
+  * Prepare new changelog entry.
+  * Skip test suite, it was also skipped before.
+  * Bring back config.sub and config.guess from upstream branch.
+  * Clarify dh_auto_test should be omitted.
+  * Update debian/changelog.
+  * Improve debian/copyright.
+  * Update debian/changelog.
+  * Remove special handling of CFLAGS for m68k.
+  * debian/patches/12_ac_config_macro_dir.patch: New patch, fixes
+    "undefined macro: AM_PATH_XMMS" and similar errors which cause
+    autoreconf to fail.
+  * Drop debian/patches/90_autoreconf.patch in favour of dh-autoreconf.
+  * Update debian/changelog.
+  * Remove 90_autoreconf.patch from debian/patches/series as well.
+
+  [ Alessio Treglia ]
+  * debian/control:
+    - Bump Standards.
+    - Fix team's name.
+  * debian/patches/13_replaygain_c_locale.patch:
+    - flac should not use locales when running with 'replaygain'
+      option (Closes: #498050).
+  * debian/patches/14_metadata_iterators_memleak.patch:
+    - Fix memoy leak in metadata_iterators.c, 'node' is not freed;
+      Patch taken from upstream's patchtracker.
+  * Add .gitignore to skip quilt files.
+  * Add gbp config file.
+  * Get rid of unneeded *.la files (Closes: #633177).
+
+ -- Fabian Greffrath <fabian+debian@greffrath.com>  Sat, 09 Jul 2011 11:51:59 +0200
+
+flac (1.2.1-3) unstable; urgency=low
+
+  * Add Joshua Kwan back to Uploaders, sorry!
+  * Update my e-mail address.
+  * Fix "libFLAC.m4 may set empty -L flag when configure is called
+    without arguments" (Closes: #579025).
+  * Consider *gnuspe which matches powerpc-unknown-linux-gnuspe where
+    AltiVec is not available at all (Closes: #585518), thanks Sebastian
+    Andrzej Siewior.
+  * Mandatory autoreconf.
+  * Add debian/source/format, keep at 1.0 for now.
+  * Add debian/README.source.
+  * Add Vcs-* and Homepage fields.
+  * Bump Standards-Version to 3.8.4.
+
+ -- Fabian Greffrath <fabian+debian@greffrath.com>  Tue, 15 Jun 2010 14:37:46 +0200
+
+flac (1.2.1-2) unstable; urgency=high
+
+  * New maintainer (Closes: #539565).
+  * Acknowledge NMUs (Closes: #456726, #455304, #525826, #525829).
+  * Urgency high, because of fixed RC bugs.
+
+  * Set Maintainer to Debian multimedia packages maintainers and added
+    myself to Uploaders.
+  * Wrapped and sorted Build-Depends.
+  * Added ${misc:Depends} to all packages and wrapped Depends fields.
+  * Bumped debhelper compat to 7.
+  * Removed versioned dependency on g++ and libid3-3.8.3-dev, the
+    required versions are already in oldstable.
+  * Bumped Standards-Version to 3.8.2.
+  * Removed Conflicts and Replaces against packages that aren't even in
+    oldstable anymore.
+  * Point to versioned license file (GPL-2).
+  * Use dh_prep instead of dh_clean -k.
+  * Update config.sub and config.guess in the configure rule and remove
+    them in the clean target.
+  * Fixed doc-base-uses-applications-section.
+  * debian/patches/09_noexec-stack.dpatch: New patch to indicate that
+    libFLAC.so doesn't need an executable stack (Closes: #467544),
+    Thanks Russell Coker <russell@coker.com.au>.
+  * Added shlibs information for libflac8 and libflac++6 (Closes:
+    #481428, #508293).
+  * Fixed binary-control-field-duplicates-source.
+  * Added patch description to debian/patches/02_doc_path.dpatch.
+  * Added patch description to debian/patches/08_gcc-4.3_fixes.dpatch.
+  * Regenerate manpages at compile time: Add docbook-to-man to Build-
+    Depends, change debian/patches/02_doc_path.dpatch to modify
+    man/flac.sgml, stop touching man/flac.1 in debian/rules and remove
+    the manpages in the clean target.
+
+ -- Fabian Greffrath <fabian@debian-unofficial.org>  Tue, 04 Aug 2009 08:54:15 +0200
+
+flac (1.2.1-1.3) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Disable use of asembler optimizations. (closes: #525826)
+  * Provide proper architecture information to build system. (closes: #525829)
+
+ -- Bastian Blank <waldi@debian.org>  Mon, 27 Apr 2009 13:09:23 +0000
+
+flac (1.2.1-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix gcc-4.3 FTBFS, patch by KiBi (Closes: #455304)
+
+ -- Marc 'HE' Brockschmidt <he@debian.org>  Sun, 16 Mar 2008 18:02:56 +0100
+
+flac (1.2.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Drop xmms-flac as xmms is being dropped (Closes: #456726).
+
+ -- Luk Claes <luk@debian.org>  Mon, 21 Jan 2008 18:23:12 +0000
+
+flac (1.2.1-1) unstable; urgency=low
+
+  * New upstream release. closes: #434701
+  * Updated the versioned build-dependency on nasm. closes: #439277
+  * Patch work:
+    - (REMOVED) 01_ldpath_fix.dpatch: fixed upstream
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Mon, 24 Sep 2007 10:48:12 -0700
+
+flac (1.1.4-3) unstable; urgency=low
+
+  * The "It's Never Too Late to Mend" release.
+  * Finally, since liboggflac and libflac have been merged, make libflac-dev
+    depend on libogg-dev. closes: #427742
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Wed, 06 Jun 2007 08:32:47 -0700
+
+flac (1.1.4-2) unstable; urgency=low
+
+  * Provide flac.pc and flac++.pc. closes: #427651
+  * Fix typo in libFLAC.m4 that messes up LD_LIBRARY_PATH by mistake if it's
+    previously set. closes: #427473
+  * Correct path to documentation. closes: #413411
+  * Updated ${Source-Version} usage to ${binary:Version} all around.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Wed, 06 Jun 2007 01:09:18 -0700
+
+flac (1.1.4-1) unstable; urgency=low
+
+  * New upstream release. closes: #405167, #411311
+    - libOggFLAC and libOggFLAC++ have been merged into libFLAC, so
+      remove their corresponding packages.
+    - Because of the API changes required to effect the above, there has
+      been yet another soname bump. libflac7 -> libflac8 and
+      libflac++5 -> libflac++6. Emails have been dispatched to the
+      maintainers of dependent packages.
+  * Some notes on patches that were removed:
+    - 02_stdin_stdout, 06_manpage_mention_utf8_convert: merged upstream
+    - 08_manpage_warnings: Upstream has changed the manpage so it defintely
+      can't fit in in 80 cols, so just forget about it. We'll live.
+    - 05_eof_warnings_are_errors: Upstream decided to add a -w option to
+      flac to treat all warnings as errors. I am going to defer to that
+      for now, but if people think it's stupid let me know and I'll port
+      the patch forward.
+    - 04_stack_smasher: was a backport from 1.1.3, so it's obsolete.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Tue, 29 May 2007 22:56:36 -0700
+
+flac (1.1.2-6) unstable; urgency=high
+
+  * Update 04_stack_smasher.dpatch, a more complete fix backported from
+    1.1.3. This should fix the XMMS crash issue, thanks Jan Luebbe.
+    closes: #401774
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Fri, 12 Jan 2007 01:12:14 -0800
+
+flac (1.1.2-5) unstable; urgency=low
+
+  * Add description for --no-utf8-convert option in metaflac.1.
+    closes: #345785
+  * Don't exit 0 when a wrong option to flac is entered. closes: #329979
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Sat, 27 May 2006 23:07:10 -0600
+
+flac (1.1.2-4) unstable; urgency=low
+
+  * Acknowledge NMU, now that it's snugly in testing. closes: #340960
+  * Fix the watch file.
+  * Make symlinks for /usr/lib/bmp in xmms-flac to 'provide' bmp-flac,
+    since input plugins between the two players are interchangeable.
+    closes: #327108, #356788
+  * Bump Standards-Version.
+  * Fix a goof in the rules that prevented ldconfig from happening in the
+    postinst of all the library packages.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Tue, 23 May 2006 21:17:41 -0700
+
+flac (1.1.2-3.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * Turn EOF warnings into errors (Closes: #340960).
+
+ -- Luk Claes <luk@debian.org>  Tue, 28 Feb 2006 23:28:02 +0100
+
+flac (1.1.2-3) unstable; urgency=medium
+
+  * Brown paper bag release.
+  * Patch work:
+    - 03_cosmetic_flac_stats.dpatch: It actually did mess with some features. 
+      Add *one* conditional to fix the bug. Thanks Rodney Gordon II
+      <meff@pobox.com> for helping debug. closes: #325078
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Sat, 27 Aug 2005 00:09:06 -0700
+
+flac (1.1.2-2) unstable; urgency=medium
+
+  * The "GO BEARS" release
+  * Patch work:
+    - 04_stack_smasher.dpatch: Fix a really dumb stack smasher that's been
+      fixed in CVS for several months but a maintenance release hasn't been
+      made for. closes: #324783
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Wed, 24 Aug 2005 00:20:17 -0700
+
+flac (1.1.2-1) unstable; urgency=low
+
+  * New maintainer.
+  * Acknowledge NMU, thanks Steve; closes: #319235
+  * New upstream release, closes: #297331
+  * Clean up all the Conflicts/Replaces that no longer apply at all.
+  * Remove dependencies on debconf.
+  * Move documentation to new package libflac-doc, closes: #212645, #289737
+  * Tighten libid3-3.8.3-dev dependencies because of C++ transition. Just
+    in case.
+  * SONAMEs once again changed upstream, rebuild your packages!
+    By virtue of being a SONAME change, this upload invalidates and thus
+    closes: #301037, #297964, #298035
+    - libflac6 -> libflac7
+    - liboggflac1 -> liboggflac3
+    - libflac++4c2 -> libflac++5
+    - liboggflac++0c2 -> liboggflac++2
+  * Patch work (now using dpatch):
+    - 01_relibtoolize.dpatch: Autotools Suck.
+    - 02_stdin_stdout.dpatch: Fix a reference in documentation to 'stdin' that
+      really means 'stdout', thanks dann frazier. closes: #207084
+    - 03_cosmetic_flac_stats.dpatch: Fix progress display with long filenames
+      (Not intensively tested, but never fear: no actual features were harmed
+      in the development of this bugfix.) closes: #138828
+  * Bump Standards-Version to 3.6.2, no changes necessary.
+  * Bump debhelper compatibility level to 4 and use debian/compat instead
+    of DH_COMPAT.
+  * Amend the description of flac to mention metaflac as well as flac.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Thu, 18 Aug 2005 02:53:09 -0700
+
+flac (1.1.1-5) unstable; urgency=low
+
+  * libflac++4 Conflicts: libflac++2c102 (= 1.1.1-1) for the same reasons
+    as in 1.1.1-3 (Closes: #290353)
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 14 Jan 2005 09:37:44 -0800
+
+flac (1.1.1-4) unstable; urgency=low
+
+  * Re-libtoolize to fix various build weirdnesses and a broken xmms-flac
+    on amd64 (Closes: #289243)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  8 Jan 2005 15:08:22 -0800
+
+flac (1.1.1-3) unstable; urgency=low
+
+  * libflac6 conflicts with the broken version of libflac4 (Closes: #289077)
+  * Disable asm optimizations on powerpc, fixing FTBFS (Closes: #289130)
+    - Apply patch from Eric Wong to fix compilation when asm
+      optimizations are disabled
+  * Update to new package names in argument to dh_shlibdeps -l
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu,  6 Jan 2005 20:23:08 -0800
+
+flac (1.1.1-2) unstable; urgency=low
+
+  * Fix -dev dependencies for soname transition (oops)
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed,  5 Jan 2005 10:13:34 -0800
+
+flac (1.1.1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #275324)
+    - Merges all of our patches to common code
+    - Fixes handling of long filenames (Closes: #213172)
+    - Properly quotes AM_PATH_LIBFLAC (Closes: #254127)
+    - Uses a much newer version of autotools (Closes: #263837)
+    - Should fix problems with 8-bit audio samples (Closes: #179764)
+    - Fixes segfault on some invalid files (Closes: #274301)
+    - Fixes problems with very long files (Closes: #200435)
+    - Fixes FLAC__STREAM_ENCODER_NOT_STREAMABLE error (Closes: #196556)
+    - Man page is improved (Closes: #196812)
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed,  5 Jan 2005 08:29:18 -0800
+
+flac (1.1.0-11) unstable; urgency=low
+
+  * Ensure that libFLAC is linked with -lm on all architectures, and
+    regardless of whether nasm is present
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 16 Apr 2004 15:14:31 -0700
+
+flac (1.1.0-10) unstable; urgency=low
+
+  * Touch man/flac.1, to avoid trying to build it even if the timestamp is
+    skewed (Closes: #203580)
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed, 30 Jul 2003 22:41:51 -0400
+
+flac (1.1.0-9) unstable; urgency=low
+
+  * Re-run automake so that the fix for #202694 actually takes effect
+    (why is this working for me on i386 every time?)
+
+ -- Matt Zimmerman <mdz@debian.org>  Tue, 29 Jul 2003 19:53:17 -0400
+
+flac (1.1.0-8) unstable; urgency=low
+
+  * Pregenerate the flac.1 man page (Closes: #203024)
+
+ -- Matt Zimmerman <mdz@debian.org>  Tue, 29 Jul 2003 08:13:50 -0400
+
+flac (1.1.0-7) unstable; urgency=low
+
+  * Link flac itself with -lm, in addition to libFLAC (why did this work
+    for me?) (Closes: #202964)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat, 26 Jul 2003 11:58:14 -0400
+
+flac (1.1.0-6) unstable; urgency=low
+
+  * Run automake so that library linking changes take effect.
+    (Closes: #194718)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat, 26 Jul 2003 00:09:32 -0400
+
+flac (1.1.0-5) unstable; urgency=low
+
+  * Long-overdue policy check
+    - Build with -g always, and omit -O2 for debug builds
+    - Pull in changes from upstream CVS to link all shared libraries
+      against dependent libraries (Closes: #194718)
+    - Standards-Version: 3.6.0
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu, 17 Jul 2003 22:43:01 -0400
+
+flac (1.1.0-4) unstable; urgency=low
+
+  * Clean up diff
+  * Move -dev packages to Section: libdevel
+  * Build-Depend on libid3-3.8.3-dev (Closes: #196285)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  7 Jun 2003 00:54:50 -0400
+
+flac (1.1.0-3) unstable; urgency=low
+
+  * Build various libraries used in the build tree using libtool rather
+    than plain .a archives, in order to get PIC code for linking into
+    shared libraries (Closes: #179434)
+  * Metaflac manpage was included upstream in 1.1.0 (Closes: #170598)
+  * Versioned build-dependency on nasm was added in 1.1.0-1
+    (Closes: #175944)
+  * 1.1.0 was uploaded (Closes: #178620)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sun,  2 Feb 2003 18:02:34 -0500
+
+flac (1.1.0-2) unstable; urgency=low
+
+  * Clean up -dev package dependencies
+    - libflac++-dev depends: libflac-dev (Closes: #179422)
+    - liboggflac-dev depends: libflac-dev
+    - liboggflac++-dev depends: liboggflac-dev, libflac++-dev
+
+ -- Matt Zimmerman <mdz@debian.org>  Sun,  2 Feb 2003 01:32:28 -0500
+
+flac (1.1.0-1) unstable; urgency=low
+
+  * New upstream release
+  * liboggflac0 -> liboggflac1
+  * liboggflac1 unfortunately conflicts with liboggflac0 due to an
+    accidental file overlap
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 31 Jan 2003 16:26:37 -0500
+
+flac (1.0.4-5) unstable; urgency=low
+
+  * Build with g++ 3.2
+  * Build-depends: g++ (>= 2:3.2)
+  * libflac++2 -> libflac++2c102
+  * liboggflac++0 -> liboggflac++0c102
+
+ -- Matt Zimmerman <mdz@debian.org>  Tue,  7 Jan 2003 20:26:25 -0500
+
+flac (1.0.4-4) unstable; urgency=low
+
+  * Build libplugin-common as PIC (Closes: #162718)
+  * Remove libflac-dev's relation with itself (thanks, lintian)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sun, 17 Nov 2002 01:34:23 -0500
+
+flac (1.0.4-3) unstable; urgency=low
+
+  * A file which belonged in libflac-dev ended up in flac 1.0.4-1, so
+    libflac-dev Replaces: libflac-dev (= 1.0.4-1) (Closes: #163847)
+
+ -- Matt Zimmerman <mdz@debian.org>  Tue,  8 Oct 2002 16:39:28 -0400
+
+flac (1.0.4-2) unstable; urgency=medium
+
+  * Fix libflac and libflac++ shared library package names, which were
+    invalidated by an unexpected soname change (Closes: #162907)
+  * Split liboggflac and liboggflac++ into separate packages
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  5 Oct 2002 22:42:56 -0400
+
+flac (1.0.4-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu, 26 Sep 2002 10:32:24 -0400
+
+flac (1.0.3-3) unstable; urgency=low
+
+  * Tidy up installation of documentation (Closes: #159676)
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu,  5 Sep 2002 08:15:58 -0400
+
+flac (1.0.3-2) unstable; urgency=low
+
+  * Change libflac++-dev to Section: devel
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat, 13 Jul 2002 11:45:28 -0400
+
+flac (1.0.3-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu,  4 Jul 2002 20:14:59 -0400
+
+flac (1.0.2+1.0.3beta-1) experimental; urgency=low
+
+  * New upstream pre-release
+  * Now provides a C++ library as well
+  * Use dh_makeshlibs to create shlibs control files
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat, 15 Jun 2002 11:59:46 -0400
+
+flac (1.0.2-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fixes a bug which crashed the input plugins after playing a few files
+    (Closes: #123210)
+  * Fixes issues with the assembler optimizations, so that they can be
+    re-enabled for better performance on i386
+
+ -- Matt Zimmerman <mdz@debian.org>  Mon, 10 Dec 2001 03:09:22 -0500
+
+flac (1.0.1-2) unstable; urgency=low
+
+  * Pre-generate man page, since something has changed upstream (Closes:
+    #120463)
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed, 21 Nov 2001 14:19:29 -0500
+
+flac (1.0.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Raw encoding bug is fixed upstream (Closes: #119396)
+  * Manpage is fixed upstream (Closes: #107207)
+
+ -- Matt Zimmerman <mdz@debian.org>  Mon, 19 Nov 2001 15:33:42 -0500
+
+flac (1.0-3) unstable; urgency=low
+
+  * Tighten build-dependency on debconf, since we use DH_COMPAT=3
+    (Closes: #115663)
+  * Disable assembler optimizations, as they seem to cause problems on
+    some systems.
+
+ -- Matt Zimmerman <mdz@debian.org>  Tue, 16 Oct 2001 07:38:13 -0400
+
+flac (1.0-2) unstable; urgency=low
+
+  * Fix shlibs file (it was trying to use a substitution variable)
+    (Closes: #107614)
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri,  3 Aug 2001 16:54:20 -0400
+
+flac (1.0-1) unstable; urgency=low
+
+  * New upstream version.
+  * debian/control: Upstream now ships our man page, so there's no need to
+    build-depend on docbook-to-man.  Build-dependency removed.
+  * debian/rules: Let upstream makefiles install headers and man page
+  * debian/control: Upstream library soname version has changed, modified
+    accordingly
+  * debian/rules: shlibs hackery is apparently no longer necessary, as
+    dpkg-shlibdeps will find shlibs files in package/DEBIAN
+  * Build-Depend on nasm on i386 to take advantage of optimized assembly
+    routines
+  * debian/rules, debian/control: Move the .la libtool widget from the
+    runtime package to the development package, and add Replaces
+  * ltmain.sh: Hack up to get things to work with libtool 1.4
+    <http://lists.debian.org/debian-devel-0105/msg02160.html>
+  * debian/rules: DH_COMPAT=3
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed, 25 Jul 2001 15:57:29 -0400
+
+flac (0.10-2) unstable; urgency=low
+
+  * Fix a build error with the xmms plugin that resulted in a broken
+    xmms-flac.  Patch forwarded upstream. (Closes: #101827)
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu, 21 Jun 2001 15:43:39 -0400
+
+flac (0.10-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Matt Zimmerman <mdz@debian.org>  Thu, 14 Jun 2001 16:05:29 -0400
+
+flac (0.9-1) unstable; urgency=low
+
+  * New upstream version.
+  * From the upstream changelog:
+  * FLAC 0.9 released.  There were some format changes that broke backwards
+    compatibility but these should be the last (see below). Also, there have
+    been several bug fixes and some new features:
+      + FLAC's sync code has been lengthened to 14 bits from 9 bits. This
+        should enable a faster and more robust synchronization mechanism.
+      + Two reserved bits were added to the frame header.
+      + A CRC-16 was added to the FLAC frame footer, and the decoder now does
+        frame integrity checking based on the CRC.
+      + The format now includes a new subframe field to indicate when a
+        subblock has one or more 0 LSBs for all samples. This increases
+        compression on some kinds of data.
+      + Added two options to the analysis mode, one for including the residual
+        signal in the analysis file, and one for generating gnuplot files of
+        each subframe's residual distribution with some statistics. See the
+        latest documentation.
+      + XMMS plugin now supports 8-bit files.
+    FLAC is on track for an official 1.0 release soon.
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri,  6 Apr 2001 07:41:30 -0400
+
+flac (0.8-1) unstable; urgency=low
+
+  * New upstream version.
+  * From the upstream changelog:
+  * This release is a result of extensive testing and fixes several bugs
+    encountered when pushing the encoder to the limit. I'm pretty
+    confident in the stability of the encoder/decoder now for all kinds of
+    input. There have also been several features added. Here is a complete
+    list of the changes since 0.7:
+      + Created a new utility called metaflac. It is a metadata editor for
+        .flac files. Right now it just lists the contents of the metadata
+        blocks but eventually it will allow update/insertion/deletion.
+      + Added two new metadata blocks: PADDING which has an obvious function,
+        and APPLICATION, which is meant to be open to third party applications.
+        See the latest format docs for more info, or the new id registration
+        page.
+      + Added a -P option to flac to reserve a PADDING block when encoding.    
+      + Added support for 24-bit files to flac (the FLAC format always        
+        supported it).                                                    
+      + Started the Winamp3 plugin.                                            
+      + Greatly expanded the test suite, adding more streams (24-bit streams,
+        noise streams, non-audio streams, more patterns) and more option  
+        combinations to the encoder. The test suite runs about 30 streams and
+        over 5000 encodings now.                                      
+  * This version includes a patch to configure.in from upstream CVS (an
+    omitted AC_OUTPUT file).
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri,  9 Mar 2001 03:58:56 -0500
+
+flac (0.7-1) unstable; urgency=low
+
+  * New upstream version.
+  * Note that this version contains a known bug that, according to the
+    author, is revealed when encoding more than 2 channels using a large
+    blocksize (>32k samples).  See
+    http://flac.sourceforge.net/news.html#20010212 for more information.
+
+ -- Matt Zimmerman <mdz@debian.org>  Fri, 23 Feb 2001 01:14:10 -0500
+
+flac (0.6-2) unstable; urgency=low
+
+  * Display a note about backward compatibility
+  * Warn users of pre-0.6 versions about upgrading, as 0.6 cannot read
+    files encoded with previous versions (Closes: #84630)
+
+ -- Matt Zimmerman <mdz@debian.org>  Sat,  3 Feb 2001 20:46:22 -0500
+
+flac (0.6-1) unstable; urgency=low
+
+  * New upstream version:
+    - encoding speed in default mode (-6) is at least 3x faster
+    - a new "loose mid-side" adaptive algorithm should help -1 and -5 modes
+    - a new analyze mode for developers                 
+    - bug fixes related to pipes
+  * Our automake patches have been incorporated upstream, so we no longer
+    need them in the Debian diff
+  * Added manpage for flac
+  * Run ldconfig in postinst (oops)
+  * Cleaned up debian/ directory
+
+ -- Matt Zimmerman <mdz@debian.org>  Mon, 29 Jan 2001 14:50:11 -0500
+
+flac (0.5-2) unstable; urgency=low
+
+  * Fixed binary package sections to match override file (oops)
+  * debian/rules: Set execute permissions on autoconf scripts created in the
+    debian diff (Closes: #83105)
+  * Honor DEB_BUILD_OPTIONS (nostrip, debug)
+
+ -- Matt Zimmerman <mdz@debian.org>  Mon, 22 Jan 2001 14:57:31 -0500
+
+flac (0.5-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Matt Zimmerman <mdz@debian.org>  Wed, 17 Jan 2001 14:52:43 -0500
+
+
--- flac-1.2.1.orig/debian/libflac-doc.install
+++ flac-1.2.1/debian/libflac-doc.install
@@ -0,0 +1 @@
+usr/share/doc/flac-1.2.1/* usr/share/doc/libflac-doc
--- flac-1.2.1.orig/debian/control
+++ flac-1.2.1/debian/control
@@ -0,0 +1,141 @@
+Source: flac
+Section: sound
+Priority: optional
+Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
+Uploaders: Joshua Kwan <joshk@triplehelix.org>,
+ Fabian Greffrath <fabian+debian@greffrath.com>
+Build-Depends: autotools-dev,
+ debhelper (>= 8.1.3),
+ dh-autoreconf,
+ docbook-to-man,
+ doxygen,
+ libid3-3.8.3-dev,
+ libogg-dev,
+ quilt (>= 0.46-7~)
+Standards-Version: 3.9.2
+Vcs-Git: git://git.debian.org/git/pkg-multimedia/flac.git
+Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/flac.git;a=summary
+Homepage: http://flac.sourceforge.net/
+
+Package: flac
+Architecture: any
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: Free Lossless Audio Codec - command line tools
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the command-line tools flac (used for encoding and
+ decoding FLACs) and metaflac (used for manipulating FLAC metadata.)
+
+Package: libflac8
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: Free Lossless Audio Codec - runtime C library
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the runtime library libFLAC.
+
+Package: libflac-doc
+Section: doc
+Architecture: all
+Suggests: libflac-dev
+Recommends: doc-base
+Depends: ${misc:Depends}
+Description: Free Lossless Audio Codec - library documentation
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the API documentation for all the FLAC libraries.
+
+Package: libflac-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libflac8 (= ${binary:Version}),
+ libogg-dev,
+ ${misc:Depends}
+Description: Free Lossless Audio Codec - C development library
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the development library libFLAC.
+
+Package: libflac++6
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends},
+ ${misc:Depends}
+Description: Free Lossless Audio Codec - C++ runtime library
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the runtime library libFLAC++.
+
+Package: libflac++-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libflac++6 (= ${binary:Version}),
+ libflac-dev,
+ ${misc:Depends}
+Description: Free Lossless Audio Codec - C++ development library
+ FLAC stands for Free Lossless Audio Codec. Grossly oversimplified, FLAC is
+ similar to MP3, but lossless.  The FLAC project consists of:
+ .
+  * The stream format
+  * libFLAC, which implements a reference encoder, stream decoder, and file
+    decoder
+  * flac, which is a command-line wrapper around libFLAC to encode and decode
+    .flac files
+  * Input plugins for various music players (Winamp, XMMS, and more in the
+    works)
+ .
+ This package contains the development library libFLAC++.
--- flac-1.2.1.orig/debian/libflac++-dev.install
+++ flac-1.2.1/debian/libflac++-dev.install
@@ -0,0 +1,5 @@
+usr/lib/*/libFLAC++.a
+usr/lib/*/libFLAC++.so
+usr/lib/*/pkgconfig/flac++.pc
+usr/include/FLAC++
+usr/share/aclocal/libFLAC++.m4
--- flac-1.2.1.orig/debian/rules
+++ flac-1.2.1/debian/rules
@@ -0,0 +1,17 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@ --with quilt,autoreconf
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--disable-rpath \
+		--disable-xmms-plugin \
+		--disable-asm-optimizations
+
+override_dh_auto_test:
+	dh_auto_test --no-act
+
+override_dh_makeshlibs:
+	dh_makeshlibs -plibflac8 -V "libflac8 (>= 1.2.1)"
+	dh_makeshlibs -plibflac++6 -V "libflac++6 (>= 1.2.1)"
--- flac-1.2.1.orig/debian/libflac8.install
+++ flac-1.2.1/debian/libflac8.install
@@ -0,0 +1 @@
+usr/lib/*/libFLAC.so.*
--- flac-1.2.1.orig/debian/libflac-doc.doc-base.ru
+++ flac-1.2.1/debian/libflac-doc.doc-base.ru
@@ -0,0 +1,15 @@
+Document: libflac-doc-ru
+Title: FLAC Project Documentation (Russian)
+Author: Josh Coalson
+Abstract: This is the HTML version of the FLAC documentation,
+ which is more or less a mirror of the FLAC homepage. It provides instructions
+ for using the command-line flac and metaflac programs, descriptions of the
+ internal format of FLAC files, the goals of the FLAC project, Frequently Asked
+ Questions about FLAC, useful information for FLAC developers, and links to
+ other applications with FLAC support. This particular version is in Russian,
+ and it has only been updated to reflect changes since FLAC version 1.1.0.
+Section: Sound
+
+Format: HTML
+Index: /usr/share/doc/libflac-doc/html/ru/index.html
+Files: /usr/share/doc/libflac-doc/html/ru/*.html
--- flac-1.2.1.orig/debian/patches/series
+++ flac-1.2.1/debian/patches/series
@@ -0,0 +1,11 @@
+02_doc_path.patch
+03_cosmetic_flac_stats.patch
+07_metaflac_error_exit.patch
+08_gcc-4.3_fixes.patch
+09_noexec-stack.patch
+10_empty_-L_flag.patch
+11_no-altivec-on-SPE.patch
+12_ac_config_macro_dir.patch
+13_replaygain_c_locale.patch
+14_metadata_iterators_memleak.patch
+15_format-not-a-string-literal-and-no-format-arguments.patch
--- flac-1.2.1.orig/debian/patches/12_ac_config_macro_dir.patch
+++ flac-1.2.1/debian/patches/12_ac_config_macro_dir.patch
@@ -0,0 +1,26 @@
+Author: Fabian Greffrath <fabian+debian@greffrath.com>
+Subject: Fixes "undefined macro: AM_PATH_XMMS" and similar errors which cause
+ autoreconf to fail.
+Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3027361&group_id=13478&atid=113478
+
+--- flac.orig/Makefile.am
++++ flac/Makefile.am
+@@ -30,6 +30,8 @@
+ 
+ AUTOMAKE_OPTIONS = foreign 1.7
+ 
++ACLOCAL_AMFLAGS = -I m4
++
+ SUBDIRS = doc include m4 man src examples test build obj
+ 
+ DISTCLEANFILES = libtool-disable-static
+--- flac.orig/configure.in
++++ flac/configure.in
+@@ -33,6 +33,7 @@ sed -e 's/^build_old_libs=yes/build_old_
+ chmod +x libtool-disable-static
+ 
+ AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
++AC_CONFIG_MACRO_DIR([m4])
+ 
+ AM_PROG_AS
+ AC_PROG_CXX
--- flac-1.2.1.orig/debian/patches/11_no-altivec-on-SPE.patch
+++ flac-1.2.1/debian/patches/11_no-altivec-on-SPE.patch
@@ -0,0 +1,56 @@
+Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Description: Consider *gnuspe which matches powerpc-unknown-linux-gnuspe where
+AltiVec is not available at all. This triplet uses SPE which is
+incompatible with AltiVec shares the same opcode range and can't be used
+at all.
+--- flac.orig/configure.in
++++ flac/configure.in
+@@ -82,6 +82,14 @@ case "$host" in
+ 	*) OBJ_FORMAT=elf ;;
+ esac
+ AC_SUBST(OBJ_FORMAT)
++case "$host" in
++	*-gnuspe)
++		abi_spe=true
++		AC_DEFINE(FLAC__CPU_PPC_SPE)
++		AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
++		;;
++esac
++AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
+ 
+ # only needed because of ntohl() usage, can get rid of after that's gone:
+ case "$host" in
+--- flac.orig/src/libFLAC/Makefile.am
++++ flac/src/libFLAC/Makefile.am
+@@ -40,8 +40,13 @@ if FLaC__SYS_DARWIN
+ CPUCFLAGS = -faltivec -force_cpusubtype_ALL -DFLAC__NO_ASM
+ else
+ # Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
++CPUCFLAGS =
++if FLaC__CPU_PPC_SPE
++else
++CPUCFLAGS += -maltivec -mabi=altivec
++endif
+ #@@@ PPC optimizations temporarily disabled
+-CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM
++CPUCFLAGS += -DFLAC__NO_ASM
+ endif
+ endif
+ 
+@@ -58,6 +63,8 @@ endif
+ if FLaC__CPU_PPC
+ ARCH_SUBDIRS = ppc
+ if FLaC__HAS_AS__TEMPORARILY_DISABLED
++if FLaC__CPU_PPC_SPE
++else
+ LOCAL_EXTRA_LIBADD = ppc/as/libFLAC-asm.la
+ LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
+ else
+@@ -67,6 +74,7 @@ LOCAL_EXTRA_LDFLAGS = ""
+ endif
+ endif
+ endif
++endif
+ endif
+ 
+ libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@
--- flac-1.2.1.orig/debian/patches/13_replaygain_c_locale.patch
+++ flac-1.2.1/debian/patches/13_replaygain_c_locale.patch
@@ -0,0 +1,63 @@
+From: hhaamu@gmail.com
+Description: flac should not use locales when running with 'replaygain' option.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=498050
+Forwarded: Bug: https://sourceforge.net/support/tracker.php?aid=3288157
+---
+ src/share/grabbag/replaygain.c |   32 +++++++++++++++++++++++++-------
+ 1 file changed, 25 insertions(+), 7 deletions(-)
+
+--- flac.orig/src/share/grabbag/replaygain.c
++++ flac/src/share/grabbag/replaygain.c
+@@ -625,6 +625,8 @@ static FLAC__bool parse_double_(const FL
+ FLAC__bool grabbag__replaygain_load_from_vorbiscomment(const FLAC__StreamMetadata *block, FLAC__bool album_mode, FLAC__bool strict, double *reference, double *gain, double *peak)
+ {
+ 	int reference_offset, gain_offset, peak_offset;
++	char *saved_locale;
++	FLAC__bool res = true;
+ 
+ 	FLAC__ASSERT(0 != block);
+ 	FLAC__ASSERT(0 != reference);
+@@ -637,20 +639,36 @@ FLAC__bool grabbag__replaygain_load_from
+ 	 */
+ 	*reference = ReplayGainReferenceLoudness;
+ 
++	/*
++	 * We need to save the old locale and switch to "C" because the locale
++	 * influences the formatting of %f and we want it a certain way.
++	 */
++	saved_locale = strdup(setlocale(LC_ALL, 0));
++	if (0 == saved_locale)
++		return false;
++	setlocale(LC_ALL, "C");
++
+ 	if(0 <= (reference_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)GRABBAG__REPLAYGAIN_TAG_REFERENCE_LOUDNESS)))
+ 		(void)parse_double_(block->data.vorbis_comment.comments + reference_offset, reference);
+ 
+ 	if(0 > (gain_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_GAIN : GRABBAG__REPLAYGAIN_TAG_TITLE_GAIN))))
+-		return !strict && grabbag__replaygain_load_from_vorbiscomment(block, !album_mode, /*strict=*/true, reference, gain, peak);
++		res = false;
+ 	if(0 > (peak_offset = FLAC__metadata_object_vorbiscomment_find_entry_from(block, /*offset=*/0, (const char *)(album_mode? GRABBAG__REPLAYGAIN_TAG_ALBUM_PEAK : GRABBAG__REPLAYGAIN_TAG_TITLE_PEAK))))
+-		return !strict && grabbag__replaygain_load_from_vorbiscomment(block, !album_mode, /*strict=*/true, reference, gain, peak);
++		res = false;
++
++	if(res && !parse_double_(block->data.vorbis_comment.comments + gain_offset, gain))
++		res = false;
++	if(res && !parse_double_(block->data.vorbis_comment.comments + peak_offset, peak))
++		res = false;
++
++	setlocale(LC_ALL, saved_locale);
++	free(saved_locale);
+ 
+-	if(!parse_double_(block->data.vorbis_comment.comments + gain_offset, gain))
+-		return !strict && grabbag__replaygain_load_from_vorbiscomment(block, !album_mode, /*strict=*/true, reference, gain, peak);
+-	if(!parse_double_(block->data.vorbis_comment.comments + peak_offset, peak))
+-		return !strict && grabbag__replaygain_load_from_vorbiscomment(block, !album_mode, /*strict=*/true, reference, gain, peak);
++	/* something failed; retry with strict */
++	if (!res && !strict)
++		res = grabbag__replaygain_load_from_vorbiscomment(block, !album_mode, /*strict=*/true, reference, gain, peak);
+ 
+-	return true;
++	return res;
+ }
+ 
+ double grabbag__replaygain_compute_scale_factor(double peak, double gain, double preamp, FLAC__bool prevent_clipping)
--- flac-1.2.1.orig/debian/patches/02_doc_path.patch
+++ flac-1.2.1/debian/patches/02_doc_path.patch
@@ -0,0 +1,13 @@
+Author: Joshua Kwan <joshk@triplehelix.org>
+Description: Correct path to documentation. closes: #413411.
+--- flac.orig/man/flac.sgml
++++ flac/man/flac.sgml
+@@ -697,7 +697,7 @@
+ 
+     <para>metaflac(1).</para>
+ 
+-    <para>The programs are documented fully by HTML format documentation, available in <filename>/usr/share/doc/flac/html</filename> on &debian; systems.</para>
++    <para>The programs are documented fully by HTML format documentation, available in <filename>/usr/share/doc/libflac-doc/html</filename> on &debian; systems.</para>
+   </refsect1>
+   <refsect1>
+     <title>AUTHOR</title>
--- flac-1.2.1.orig/debian/patches/08_gcc-4.3_fixes.patch
+++ flac-1.2.1/debian/patches/08_gcc-4.3_fixes.patch
@@ -0,0 +1,13 @@
+Author: Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
+Description: Fix gcc-4.3 FTBFS, patch by KiBi (Closes: #455304).
+--- flac.orig/examples/cpp/encode/file/main.cpp
++++ flac/examples/cpp/encode/file/main.cpp
+@@ -33,6 +33,8 @@
+ #include "FLAC++/metadata.h"
+ #include "FLAC++/encoder.h"
+ 
++#include <cstring>
++
+ class OurEncoder: public FLAC::Encoder::File {
+ public:
+ 	OurEncoder(): FLAC::Encoder::File() { }
--- flac-1.2.1.orig/debian/patches/15_format-not-a-string-literal-and-no-format-arguments.patch
+++ flac-1.2.1/debian/patches/15_format-not-a-string-literal-and-no-format-arguments.patch
@@ -0,0 +1,59 @@
+Author: Fabian Greffrath <fabian+debian@greffrath.com>
+Description: Fixes "format not a string literal and no format arguments
+ [-Werror=format-security]" errors
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643377
+
+--- flac.orig/src/test_grabbag/cuesheet/main.c
++++ flac/src/test_grabbag/cuesheet/main.c
+@@ -115,12 +115,12 @@ int main(int argc, char *argv[])
+ 	const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ cdda ]\n";
+ 
+ 	if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
+-		printf(usage);
++		printf("%s", usage);
+ 		return 0;
+ 	}
+ 
+ 	if(argc < 3 || argc > 4) {
+-		fprintf(stderr, usage);
++		fprintf(stderr, "%s", usage);
+ 		return 255;
+ 	}
+ 
+@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
+ 		if(0 == strcmp(argv[3], "cdda"))
+ 			is_cdda = true;
+ 		else {
+-			fprintf(stderr, usage);
++			fprintf(stderr, "%s", usage);
+ 			return 255;
+ 		}
+ 	}
+--- flac.orig/src/test_grabbag/picture/main.c
++++ flac/src/test_grabbag/picture/main.c
+@@ -211,12 +211,12 @@ int main(int argc, char *argv[])
+ 	const char *usage = "usage: test_pictures path_prefix\n";
+ 
+ 	if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
+-		printf(usage);
++		printf("%s", usage);
+ 		return 0;
+ 	}
+ 
+ 	if(argc != 2) {
+-		fprintf(stderr, usage);
++		fprintf(stderr, "%s", usage);
+ 		return 255;
+ 	}
+ 
+--- flac.orig/src/test_seeking/main.c
++++ flac/src/test_seeking/main.c
+@@ -429,7 +429,7 @@ int main(int argc, char *argv[])
+ 	static const char * const usage = "usage: test_seeking file.flac [#seeks] [#samples-in-file.flac] [file.raw]\n";
+ 
+ 	if (argc < 2 || argc > 5) {
+-		fprintf(stderr, usage);
++		fprintf(stderr, "%s", usage);
+ 		return 1;
+ 	}
+ 
--- flac-1.2.1.orig/debian/patches/03_cosmetic_flac_stats.patch
+++ flac-1.2.1/debian/patches/03_cosmetic_flac_stats.patch
@@ -0,0 +1,27 @@
+Author: Joshua Kwan <joshk@triplehelix.org>
+Description: Fix misuse of \r (potentially) in flac -d or -t output, closes: #138828
+--- flac.orig/src/flac/decode.c
++++ flac/src/flac/decode.c
+@@ -1355,6 +1355,7 @@ void print_error_with_state(const Decode
+ 
+ void print_stats(const DecoderSession *decoder_session)
+ {
++	static int count = 0;
+ 	if(flac__utils_verbosity_ >= 2) {
+ #if defined _MSC_VER || defined __MINGW32__
+ 		/* with MSVC you have to spoon feed it the casting */
+@@ -1363,7 +1364,13 @@ void print_stats(const DecoderSession *d
+ 		const double progress = (double)decoder_session->samples_processed / (double)decoder_session->total_samples * 100.0;
+ #endif
+ 		if(decoder_session->total_samples > 0) {
+-			fprintf(stderr, "\r%s: %s%u%% complete",
++			while (count > 0 && count--)
++				fprintf(stderr, "\b");
++
++			if ((unsigned)floor(progress + 0.5) == 100)
++				return;
++
++			count = fprintf(stderr, "%s: %s%u%% complete",
+ 				decoder_session->inbasefilename,
+ 				decoder_session->test_only? "testing, " : decoder_session->analysis_mode? "analyzing, " : "",
+ 				(unsigned)floor(progress + 0.5)
--- flac-1.2.1.orig/debian/patches/09_noexec-stack.patch
+++ flac-1.2.1/debian/patches/09_noexec-stack.patch
@@ -0,0 +1,13 @@
+Author: Russell Coker <russell@coker.com.au>
+Description: The following patch adds a section to the libFLAC.so file to indicate that
+it doesn't need an executable stack. This allows programs using it to run
+correctly on SE Linux systems, and with exec-shield.
+--- flac.orig/src/libFLAC/ia32/nasm.h
++++ flac/src/libFLAC/ia32/nasm.h
+@@ -73,3 +73,6 @@
+ _%1:
+ %1:
+ %endmacro
++
++section .note.GNU-stack progbits noalloc noexec nowrite align=1
++
--- flac-1.2.1.orig/debian/patches/07_metaflac_error_exit.patch
+++ flac-1.2.1/debian/patches/07_metaflac_error_exit.patch
@@ -0,0 +1,24 @@
+Author: Joshua Kwan <joshk@triplehelix.org>
+Description: Exit with error if invalid option is passed. #329979
+--- flac.orig/src/metaflac/main.c
++++ flac/src/metaflac/main.c
+@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
+ 	setlocale(LC_ALL, "");
+ 	init_options(&options);
+ 
+-	if(parse_options(argc, argv, &options))
++	if ((ret = parse_options(argc, argv, &options)) == 0)
+ 		ret = !do_operations(&options);
+ 	else
+ 		ret = 1;
+--- flac.orig/src/metaflac/options.c
++++ flac/src/metaflac/options.c
+@@ -249,7 +249,7 @@ FLAC__bool parse_options(int argc, char
+ 		}
+ 	}
+ 
+-	return !had_error;
++	return had_error;
+ }
+ 
+ void free_options(CommandLineOptions *options)
--- flac-1.2.1.orig/debian/patches/10_empty_-L_flag.patch
+++ flac-1.2.1/debian/patches/10_empty_-L_flag.patch
@@ -0,0 +1,30 @@
+Author: Fabian Greffrath <fabian+debian@greffrath.com>
+Description: Fix libFLAC.m4 may set empty -L flag when configure is called without
+arguments, provided of course that the target package's configure script  
+is properly re-generated against the fixed libFLAC.m4
+--- flac.orig/src/libFLAC/libFLAC.m4
++++ flac/src/libFLAC/libFLAC.m4
+@@ -14,14 +14,18 @@ AC_ARG_WITH(libFLAC-includes,[  --with-l
+ AC_ARG_ENABLE(libFLACtest, [  --disable-libFLACtest       Do not try to compile and run a test libFLAC program],, enable_libFLACtest=yes)
+ 
+   if test "x$libFLAC_libraries" != "x" ; then
+-    LIBFLAC_LIBDIR="$libFLAC_libraries"
++    LIBFLAC_LIBS="-L$libFLAC_libraries"
++  elif test "x$libFLAC_prefix" = "xno" || test "x$libFLAC_prefix" = "xyes" ; then
++    LIBFLAC_LIBS=""
+   elif test "x$libFLAC_prefix" != "x" ; then
+-    LIBFLAC_LIBDIR="$libFLAC_prefix/lib"
+-  elif test "x$prefix" != "xNONE" ; then
+-    LIBFLAC_LIBDIR="$libdir"
++    LIBFLAC_LIBS="-L$libFLAC_prefix/lib"
++  elif test "x$prefix" != "xNONE"; then
++    LIBFLAC_LIBS="-L$prefix/lib"
+   fi
+ 
+-  LIBFLAC_LIBS="-L$LIBFLAC_LIBDIR -lFLAC $OGG_LIBS -lm"
++  if test "x$libFLAC_prefix" != "xno" ; then
++    LIBFLAC_LIBS="$LIBFLAC_LIBS -lFLAC $OGG_LIBS -lm"
++  fi
+ 
+   if test "x$libFLAC_includes" != "x" ; then
+     LIBFLAC_CFLAGS="-I$libFLAC_includes"
--- flac-1.2.1.orig/debian/patches/14_metadata_iterators_memleak.patch
+++ flac-1.2.1/debian/patches/14_metadata_iterators_memleak.patch
@@ -0,0 +1,16 @@
+Description: Memoy leak at line in metadata_iterators.c, 'node' is not freed.
+From: https://sourceforge.net/tracker/?func=detail&aid=2946736&group_id=13478&atid=313478
+---
+ src/libFLAC/metadata_iterators.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- flac.orig/src/libFLAC/metadata_iterators.c
++++ flac/src/libFLAC/metadata_iterators.c
+@@ -1217,6 +1217,7 @@ static FLAC__bool chain_read_cb_(FLAC__M
+ 			}
+ 
+ 			if(!read_metadata_block_header_cb_(handle, read_cb, &is_last, &type, &length)) {
++				node_delete_(node);
+ 				chain->status = FLAC__METADATA_CHAIN_STATUS_READ_ERROR;
+ 				return false;
+ 			}
--- flac-1.2.1.orig/debian/source/format
+++ flac-1.2.1/debian/source/format
@@ -0,0 +1 @@
+1.0
