Control: tags -1 +patch  +pending

Dear maintainer,

I've prepared an NMU for speex (versioned as 1.2~rc1.2-2) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

Regards.

diff -Nru speex-1.2~rc1.2/debian/changelog speex-1.2~rc1.2/debian/changelog
--- speex-1.2~rc1.2/debian/changelog    2022-02-24 13:15:44.000000000 -0500
+++ speex-1.2~rc1.2/debian/changelog    2022-02-24 13:03:43.000000000 -0500
@@ -1,3 +1,41 @@
+speex (1.2~rc1.2-2) unstable; urgency=medium
+
+  * debian/control: Take over maint via ITS. (Closes: #1004992, #960501)
+  * debian/upstream/metadata: Added (upstream GitLab repo).
+  * debian/changelog: Cleanup trailing spaces.
+  * debian/compat: Dropped, useless.
+  * debian/:
+    + Bump debhelper compat to v13. (Closes: #965827)
+    + Bump Standards-Version to 4.6.0.
+    + Apply "wrap-and-sort -abst".
+  * debian/control:
+    + Drop manual -dbg package. (Closes: #960498)
+    + Add missing ${misc:Depends} placeholder.
+    + Mark speex-doc as Multi-Arch: foreign.
+    + Let speex suggests speex-doc (Closes: #805897).
+    + debian/control: Drop ancient Conflicts fields.
+  * debian/rules: Simplified using dh.
+    + Do not set custom compile lags. Use default ones since they
+      are now good enough.
+    + Do not build extra sse2 library for i386. This greatly complicates
+      package maintenance with little benefit, and also not really used
+      by the OS.
+    + Only use fixed point + arm4-asm optimization for armel. Do not use
+      fixed point for armhf. (Closes: #736752)
+      Speex 1.2.0 has newer options, but we need to use them after 1.2.0
+      is packaged.
+  * debian/source/format: Use "3.0 (quilt)".
+  * debian/patches: Convert from 1.0-format direct changes.
+    + debian/patches/0001-CVE-2020-23903.patch:
+      Add patch from Ubuntu. (CVE-2020-23903)
+  * debian/libspeex{1,dsp1}.shlibs: Set up file based on d/rules.
+  * debian/speex-doc.manpages: Dropped. section 3 manpage has not been
+    provided for a long time.
+  * debian/speex-doc.doc-base: Correctly reference documentation in
+    usr/share/doc/speex/.
+
+ -- Boyuan Yang <by...@debian.org>  Thu, 24 Feb 2022 13:03:43 -0500
+
 speex (1.2~rc1.2-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
@@ -375,7 +413,7 @@
 speex (1.0.beta4-1) unstable; urgency=low
 
   * New upstream release
-  * Now with VAD - Voice Activity Detection and 
+  * Now with VAD - Voice Activity Detection and
     DTX - Discontinuous Transmission
 
  -- A. Maitland Bottoms <bott...@debian.org>  Fri, 20 Dec 2002 17:53:02 -0500
diff -Nru speex-1.2~rc1.2/debian/compat speex-1.2~rc1.2/debian/compat
--- speex-1.2~rc1.2/debian/compat       2022-02-24 13:15:44.000000000 -0500
+++ speex-1.2~rc1.2/debian/compat       1969-12-31 19:00:00.000000000 -0500
@@ -1 +0,0 @@
-5
diff -Nru speex-1.2~rc1.2/debian/control speex-1.2~rc1.2/debian/control
--- speex-1.2~rc1.2/debian/control      2022-02-24 13:15:44.000000000 -0500
+++ speex-1.2~rc1.2/debian/control      2022-02-24 13:03:43.000000000 -0500
@@ -1,40 +1,49 @@
 Source: speex
 Section: sound
 Priority: optional
-Maintainer: Ron Lee <r...@debian.org>
-Build-Depends: debhelper (>= 8.1.3), libogg-dev, dpkg-dev (>= 1.13.19)
-Build-Depends-Indep: doxygen, graphviz
-Standards-Version: 3.9.5.0
+Maintainer: Debian Multimedia Maintainers
<debian-multime...@lists.debian.org>
+Uploaders:
+ Boyuan Yang <by...@debian.org>,
+Build-Depends:
+ debhelper-compat (= 13),
+ libogg-dev,
+ pkg-config,
+Build-Depends-Indep:
+ doxygen,
+ graphviz,
+Standards-Version: 4.6.0
 Homepage: http://www.speex.org/
-Vcs-Git: https://salsa.debian.org/debian/speex.git
-Vcs-Browser: https://salsa.debian.org/debian/speex
+Vcs-Git: https://salsa.debian.org/ron/speex.git
+Vcs-Browser: https://salsa.debian.org/ron/speex
 
-Package: speex
+Package: libspeex-dev
 Architecture: any
-Multi-Arch: foreign
-Depends: ${shlibs:Depends}
-Description: The Speex codec command line tools
+Multi-Arch: same
+Section: libdevel
+Depends:
+ libspeex1 (= ${binary:Version}),
+ ${misc:Depends},
+Suggests:
+ pkg-config,
+Description: The Speex codec library development files
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
  it is meant to be complementary to the Vorbis codec which places a greater
  emphasis on high-quality music reproduction.
  .
- This package contains the encoder and decoder command-line applications.
+ This package provides the speex library headers and development files.
 
 Package: libspeex1
 Architecture: any
 Multi-Arch: same
 Section: libs
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}
-Suggests: speex
-Conflicts: libopal-2.2 (<= 2.2.11~dfsg1-3),
-           libopal-2.2-develop (<= 2.2.11~dfsg1-3),
-           libopal-2.2-ptrace (<= 2.2.11~dfsg1-3),
-           libopal-2.2.0,
-           libiaxclient1 (<= 2.0.2-1),
-           asterisk (<=1:1.4.18.1~dfsg-1),
-           libmediastreamer0 (<= 2.1.0-1)
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Suggests:
+ speex,
 Description: The Speex codec runtime library
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
@@ -43,26 +52,33 @@
  .
  This package provides the speex runtime library.
 
-Package: libspeex-dev
+Package: libspeexdsp-dev
 Architecture: any
 Multi-Arch: same
 Section: libdevel
-Depends: libspeex1 (= ${binary:Version})
-Suggests: pkg-config
-Description: The Speex codec library development files
+Depends:
+ libspeex-dev (= ${binary:Version}),
+ libspeexdsp1 (= ${binary:Version}),
+ ${misc:Depends},
+Suggests:
+ pkg-config,
+Description: The Speex extended library development files
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
  it is meant to be complementary to the Vorbis codec which places a greater
  emphasis on high-quality music reproduction.
  .
- This package provides the speex library headers and development files.
+ This package provides the speex extended library headers and development
files.
 
 Package: libspeexdsp1
 Architecture: any
 Multi-Arch: same
 Section: libs
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}
+Pre-Depends:
+ ${misc:Pre-Depends},
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
 Description: The Speex extended runtime library
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
@@ -72,24 +88,29 @@
  This package provides the runtime library of additional functions that
  are part of the Speex distribution.
 
-Package: libspeexdsp-dev
+Package: speex
 Architecture: any
-Multi-Arch: same
-Section: libdevel
-Depends: libspeexdsp1 (= ${binary:Version}), libspeex-dev (=
${binary:Version})
-Suggests: pkg-config
-Description: The Speex extended library development files
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+Suggests:
+ speex-doc,
+Description: The Speex codec command line tools
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
  it is meant to be complementary to the Vorbis codec which places a greater
  emphasis on high-quality music reproduction.
  .
- This package provides the speex extended library headers and development
files.
+ This package contains the encoder and decoder command-line applications.
 
 Package: speex-doc
 Architecture: all
+Multi-Arch: foreign
 Section: doc
-Suggests: speex
+Depends:
+ ${misc:Depends},
+Suggests:
+ speex,
 Description: Documentation for speex
  Speex is an audio codec especially designed for compressing voice at low
  bit-rates for applications such as voice over IP (VoIP). In some senses,
@@ -97,11 +118,3 @@
  emphasis on high-quality music reproduction.
  .
  This package contains the Speex documentation.
-
-Package: libspeex-dbg
-Section: debug
-Priority: extra
-Architecture: any
-Depends: libspeex1 (= ${binary:Version}), libspeexdsp1 (= ${binary:Version})
-Description: debugging symbols for libspeex and libspeexdsp
- This package provides the detached debug symbols for those libraries.
diff -Nru speex-1.2~rc1.2/debian/libspeex1.install speex-
1.2~rc1.2/debian/libspeex1.install
--- speex-1.2~rc1.2/debian/libspeex1.install    1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/libspeex1.install    2022-02-24 12:44:50.000000000
-0500
@@ -0,0 +1,2 @@
+usr/lib/*/libspeex.so.1
+usr/lib/*/libspeex.so.1.*
diff -Nru speex-1.2~rc1.2/debian/libspeex1.shlibs speex-
1.2~rc1.2/debian/libspeex1.shlibs
--- speex-1.2~rc1.2/debian/libspeex1.shlibs     1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/libspeex1.shlibs     2022-02-24 12:35:00.000000000
-0500
@@ -0,0 +1 @@
+libspeex 1 libspeex1 (>= 1.2~beta3-1)
diff -Nru speex-1.2~rc1.2/debian/libspeex-dev.install speex-
1.2~rc1.2/debian/libspeex-dev.install
--- speex-1.2~rc1.2/debian/libspeex-dev.install 2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/debian/libspeex-dev.install 2022-02-24 12:46:45.000000000
-0500
@@ -8,3 +8,4 @@
 usr/lib/*/libspeex.a
 usr/lib/*/libspeex.so
 usr/lib/*/pkgconfig/speex.pc
+usr/share/aclocal/speex.m4
diff -Nru speex-1.2~rc1.2/debian/libspeexdsp1.install speex-
1.2~rc1.2/debian/libspeexdsp1.install
--- speex-1.2~rc1.2/debian/libspeexdsp1.install 1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/libspeexdsp1.install 2022-02-24 12:45:07.000000000
-0500
@@ -0,0 +1,2 @@
+usr/lib/*/libspeexdsp.so.1
+usr/lib/*/libspeexdsp.so.1.*
diff -Nru speex-1.2~rc1.2/debian/libspeexdsp1.shlibs speex-
1.2~rc1.2/debian/libspeexdsp1.shlibs
--- speex-1.2~rc1.2/debian/libspeexdsp1.shlibs  1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/libspeexdsp1.shlibs  2022-02-24 12:35:19.000000000
-0500
@@ -0,0 +1 @@
+libspeexdsp 1 libspeexdsp1 (>= 1.2~beta3.2-1)
diff -Nru speex-1.2~rc1.2/debian/not-installed speex-1.2~rc1.2/debian/not-
installed
--- speex-1.2~rc1.2/debian/not-installed        1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/not-installed        2022-02-24 12:47:46.000000000
-0500
@@ -0,0 +1,4 @@
+# libtool .la file
+usr/lib/*/*.la
+# installed by speex-doc
+usr/share/doc/speex/manual.pdf
diff -Nru speex-1.2~rc1.2/debian/patches/0001-CVE-2020-23903.patch speex-
1.2~rc1.2/debian/patches/0001-CVE-2020-23903.patch
--- speex-1.2~rc1.2/debian/patches/0001-CVE-2020-23903.patch    1969-12-31
19:00:00.000000000 -0500
+++ speex-1.2~rc1.2/debian/patches/0001-CVE-2020-23903.patch    2022-02-24
12:26:50.000000000 -0500
@@ -0,0 +1,29 @@
+From: Leonidas Da Silva Barbosa <leo.barb...@canonical.com>
+Date: Wed, 23 Feb 2022 10:33:17 -0300
+Subject: CVE-2020-23903
+
+Taken from speex/1.2~rc1.2-1.1ubuntu3:
+
+ * SECURITY UPDATE: Divide by Zero
+   - debian/patches/CVE-2020-23903.patch: guard against
+     invalid channel numbers in src/wav_io.c.
+
+Applied-Upstream:
https://gitlab.xiph.org/xiph/speex/-/commit/870ff845b32f314aec0036641ffe18aba4916887
+Forwarded: https://gitlab.xiph.org/xiph/speex/-/merge_requests/1
+---
+ src/wav_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wav_io.c b/src/wav_io.c
+index 02931b1..a2d0c11 100644
+--- a/src/wav_io.c
++++ b/src/wav_io.c
+@@ -109,7 +109,7 @@ int read_wav_header(FILE *file, int *rate, int *channels,
int *format, spx_int32
+    stmp = le_short(stmp);
+    *channels = stmp;
+    
+-   if (stmp>2)
++   if (stmp>2 || stmp<1)
+    {
+       fprintf (stderr, "Only mono and (intensity) stereo supported\n");
+       return -1;
diff -Nru speex-1.2~rc1.2/debian/patches/0002-debian-changes.patch speex-
1.2~rc1.2/debian/patches/0002-debian-changes.patch
--- speex-1.2~rc1.2/debian/patches/0002-debian-changes.patch    1969-12-31
19:00:00.000000000 -0500
+++ speex-1.2~rc1.2/debian/patches/0002-debian-changes.patch    2022-02-24
12:26:42.000000000 -0500
@@ -0,0 +1,140 @@
+From: Boyuan Yang <by...@debian.org>
+Date: Thu, 24 Feb 2022 11:51:30 -0500
+Subject: debian-changes
+
+Changes from 1.2~rc1-4:
+
+[ Ron Lee ] (libspeex/speex_header.c)
+  * Check the size of the header packet before we look inside it in
+    speex_packet_to_header().  Which wasn't detected by the magic flags,
+    but was spotted in an old-fashioned by-eye code review while sanity
+    checking the new OggOpus spec.
+
+Changes from 1.2~rc1-7:
+
+[ Ron Lee ] (libspeex/resample.c)
+  * Minimal set of resampler RC fixes targeted for Wheezy.
+  * Fixes a bug with selecting the resampler with the smallest memory
footprint
+    for some sample rate pairs.
+  * Fixes a bug where the filter length may not have been a multiple of 8 for
+    some sample rate pairs, as is needed for the SSE implementation to avoid
+    the SSE operations reading past the end of the buffer.
+  * Fixes a type mismatch in computing allocation sizes.  This should not be
a
+    problem on any currently existing Debian arch, but it was obviously
wrong,
+    and the fix is trivial and obviously right, so there's no point waiting
for
+    someone to hit it before we correct this.
+  * Fixes the problem seen with some sample rate pairs if an integer number
of
+    samples are not processed every frame, leading to clicking or truncation.
+    Closes: #689049
+---
+ libspeex/resample.c     | 24 ++++++++++++++----------
+ libspeex/speex_header.c | 17 +++++++++--------
+ 2 files changed, 23 insertions(+), 18 deletions(-)
+
+diff --git a/libspeex/resample.c b/libspeex/resample.c
+index bebd1a8..0a0296b 100644
+--- a/libspeex/resample.c
++++ b/libspeex/resample.c
+@@ -561,8 +561,8 @@ static void update_filter(SpeexResamplerState *st)
+       st->cutoff = quality_map[st->quality].downsample_bandwidth * st-
>den_rate / st->num_rate;
+       /* FIXME: divide the numerator and denominator by a certain amount if
they're too large */
+       st->filt_len = st->filt_len*st->num_rate / st->den_rate;
+-      /* Round down to make sure we have a multiple of 4 */
+-      st->filt_len &= (~0x3);
++      /* Round up to make sure we have a multiple of 8 for SSE */
++      st->filt_len = ((st->filt_len-1)&(~0x7))+8;
+       if (2*st->den_rate < st->num_rate)
+          st->oversample >>= 1;
+       if (4*st->den_rate < st->num_rate)
+@@ -579,7 +579,7 @@ static void update_filter(SpeexResamplerState *st)
+    }
+    
+    /* Choose the resampling type that requires the least amount of memory */
+-   if (st->den_rate <= st->oversample)
++   if (st->filt_len*st->den_rate <= st->filt_len*st->oversample+8)
+    {
+       spx_uint32_t i;
+       if (!st->sinc_table)
+@@ -756,9 +756,9 @@ EXPORT SpeexResamplerState
*speex_resampler_init_frac(spx_uint32_t nb_channels,
+ #endif
+    
+    /* Per channel data */
+-   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(int));
+-   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
+-   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
++   st->last_sample =
(spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t));
++   st->magic_samples =
(spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
++   st->samp_frac_num =
(spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
+    for (i=0;i<nb_channels;i++)
+    {
+       st->last_sample[i] = 0;
+@@ -954,13 +954,15 @@ EXPORT int
speex_resampler_process_interleaved_float(SpeexResamplerState *st, co
+ {
+    spx_uint32_t i;
+    int istride_save, ostride_save;
+-   spx_uint32_t bak_len = *out_len;
++   spx_uint32_t bak_out_len = *out_len;
++   spx_uint32_t bak_in_len = *in_len;
+    istride_save = st->in_stride;
+    ostride_save = st->out_stride;
+    st->in_stride = st->out_stride = st->nb_channels;
+    for (i=0;i<st->nb_channels;i++)
+    {
+-      *out_len = bak_len;
++      *out_len = bak_out_len;
++      *in_len = bak_in_len;
+       if (in != NULL)
+          speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len);
+       else
+@@ -975,13 +977,15 @@ EXPORT int
speex_resampler_process_interleaved_int(SpeexResamplerState *st, cons
+ {
+    spx_uint32_t i;
+    int istride_save, ostride_save;
+-   spx_uint32_t bak_len = *out_len;
++   spx_uint32_t bak_out_len = *out_len;
++   spx_uint32_t bak_in_len = *in_len;
+    istride_save = st->in_stride;
+    ostride_save = st->out_stride;
+    st->in_stride = st->out_stride = st->nb_channels;
+    for (i=0;i<st->nb_channels;i++)
+    {
+-      *out_len = bak_len;
++      *out_len = bak_out_len;
++      *in_len = bak_in_len;
+       if (in != NULL)
+          speex_resampler_process_int(st, i, in+i, in_len, out+i, out_len);
+       else
+diff --git a/libspeex/speex_header.c b/libspeex/speex_header.c
+index b743059..92cc0d4 100644
+--- a/libspeex/speex_header.c
++++ b/libspeex/speex_header.c
+@@ -147,20 +147,21 @@ EXPORT SpeexHeader *speex_packet_to_header(char
*packet, int size)
+    int i;
+    SpeexHeader *le_header;
+    const char *h = "Speex   ";
+-   for (i=0;i<8;i++)
+-      if (packet[i]!=h[i])
+-      {
+-         speex_notify("This doesn't look like a Speex file");
+-         return NULL;
+-      }
+-   
++
+    /*FIXME: Do we allow larger headers?*/
+    if (size < (int)sizeof(SpeexHeader))
+    {
+       speex_notify("Speex header too small");
+       return NULL;
+    }
+-   
++
++   for (i=0;i<8;i++)
++      if (packet[i]!=h[i])
++      {
++         speex_notify("This doesn't look like a Speex file");
++         return NULL;
++      }
++
+    le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader));
+    
+    SPEEX_COPY(le_header, (SpeexHeader*)packet, 1);
diff -Nru speex-1.2~rc1.2/debian/patches/series speex-
1.2~rc1.2/debian/patches/series
--- speex-1.2~rc1.2/debian/patches/series       1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/patches/series       2022-02-24 12:26:42.000000000
-0500
@@ -0,0 +1,2 @@
+0001-CVE-2020-23903.patch
+0002-debian-changes.patch
diff -Nru speex-1.2~rc1.2/debian/rules speex-1.2~rc1.2/debian/rules
--- speex-1.2~rc1.2/debian/rules        2022-02-24 13:15:44.000000000 -0500
+++ speex-1.2~rc1.2/debian/rules        2022-02-24 12:53:09.000000000 -0500
@@ -1,181 +1,45 @@
 #!/usr/bin/make -f
-# Copyright Ron Lee 2003, 2004, 2007, 2008, 2012
+# -*- makefile -*-
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+export DEB_LDFLAGS_MAINT_APPEND =
 
-#export DH_VERBOSE=1
-export DH_OPTIONS
-
-SHELL = /bin/bash
-
-NUM_CPUS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null)
-PARALLEL = $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-NJOBS    = -j$(or $(PARALLEL),$(NUM_CPUS),1)
-
-
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
-DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-
-
-HARD_CPPFLAGS = -D_FORTIFY_SOURCE=2
-HARD_CFLAGS   = -Wformat=2
-HARD_LDFLAGS  = -Wl,-z,now
-
-ifneq (,$(filter-out $(DEB_HOST_ARCH), alpha hppa arm))
-       HARD_CFLAGS += -fstack-protector --param ssp-buffer-size=4
-endif
-ifneq (,$(filter-out $(DEB_HOST_ARCH), ia64 hppa avr32))
-       HARD_LDFLAGS += -Wl,-z,relro
-endif
-
-# Keep dpkg-buildpackage the hell out of messing with our compile flags,
-# we should trust upstream to know better than it what to use here.
-# We explicitly re-add -g and -O2 here, since not all configurations do
-# set it explicitly (and instead rely on autoconf's default of doing that,
-# which we override here when we set the hardening flags, if we do).
-CPPFLAGS = $(HARD_CPPFLAGS)
-CFLAGS   = $(HARD_CFLAGS) -g -O2
-CXXFLAGS = $(HARD_CFLAGS) -g -O2
-LDFLAGS  = $(HARD_LDFLAGS)
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS = -Wall -g -O0
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       INSTALL_PROGRAM += -s
-endif
-
-
-objdir            = objs
-objdir_sse        = objs-sse
-objdir_fixedpoint = objs-fixed-point
-
-all_objs  = $(objdir) $(objdir_sse) $(objdir_fixedpoint)
-arch_objs = $(objdir)
+include /usr/share/dpkg/architecture.mk
 
 ifeq ($(DEB_HOST_ARCH_CPU),arm)
-objdir             = $(objdir_fixedpoint)
 
-ifneq ($(DEB_HOST_ARCH),armhf)
+ifeq ($(DEB_HOST_ARCH),armel)
 EXTRA_CONFIG_FLAGS = --enable-arm4-asm
+EXTRA_CONFIG_FLAGS += --enable-fixed-point
 endif
 
 endif
 
 ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
-objdir             = $(objdir_fixedpoint)
+EXTRA_CONFIG_FLAGS = --enable-fixed-point
 endif
 
-ifeq ($(DEB_HOST_ARCH_CPU),i386)
-arch_objs += $(objdir_sse)
-endif
+%:
+       dh $@
 
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               $(EXTRA_CONFIG_FLAGS) \
+            $(NULL)
 
-clean:
-       dh_testdir
-       dh_testroot
-       $(RM) *-stamp
-       $(RM) -r $(all_objs) doc/{html,man,latex}
-       dh_clean
-
-
-# This first empty one is equivalent to declaring it .SECONDARY while we have
-# no target specific variables to set.  We don't want it removed by default
as
-# an unnamed intermediate file when the build target is completed.
-$(objdir)/config.status:
-$(objdir_sse)/config.status:        EXTRA_CONFIG_FLAGS += --enable-sse
-$(objdir_fixedpoint)/config.status: EXTRA_CONFIG_FLAGS += --enable-fixed-
point
-
-%/config.status: configure
-       dh_testdir
-       dh_update_autotools_config
-       mkdir -p $*
-       cd $* && ../configure --host=$(DEB_HOST_GNU_TYPE)       \
-                             --build=$(DEB_BUILD_GNU_TYPE)     \
-                             --prefix=/usr                     \
-                             --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
\
-                             $(EXTRA_CONFIG_FLAGS)             \
-                             CPPFLAGS="$(CPPFLAGS)"            \
-                             CFLAGS="$(CFLAGS)"                \
-                             CXXFLAGS="$(CXXFLAGS)"            \
-                             LDFLAGS="$(LDFLAGS)"
-
-build: build-arch build-indep
-
-build-arch: $(foreach d,$(arch_objs),build-target-$(d)-stamp)
-build-target-%-stamp : %/config.status
-       dh_testdir
-       $(MAKE) $(NJOBS) -C $*
-       touch $@
-
-build-indep: build-indep-stamp
-build-indep-stamp:
-       dh_testdir
+execute_before_dh_installdocs-indep:
        doxygen Doxyfile
-       touch $@
-
-
-install: install-arch install-indep
-
-install-arch: install-arch-stamp
-install-arch-stamp: build-arch
-       dh_testdir
-       cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
-       if [ -d "$(objdir_sse)" ]; then \
-           dh_install -plibspeex1   
$(objdir_sse)/libspeex/.libs/libspeex.so.* \
-                                     usr/lib/$(DEB_HOST_MULTIARCH)/sse2; \
-           dh_install -plibspeexdsp1
$(objdir_sse)/libspeex/.libs/libspeexdsp.so.* \
-                                     usr/lib/$(DEB_HOST_MULTIARCH)/sse2; \
-       fi
-
-       dh_install -plibspeex1    $(objdir)/libspeex/.libs/libspeex.so.* \
-                                 usr/lib/$(DEB_HOST_MULTIARCH)
-
-       dh_install -plibspeexdsp1 $(objdir)/libspeex/.libs/libspeexdsp.so.* \
-                                 usr/lib/$(DEB_HOST_MULTIARCH)
-
-       dh_install -plibspeex-dev -plibspeexdsp-dev -pspeex --
sourcedir=debian/tmp
-       touch $@
-
-install-indep: build-indep
-
-
-binary: binary-indep binary-arch
-
-binary-indep: DH_OPTIONS = -i
-binary-indep: install-indep
-       dh_testdir
-       dh_testroot
-       dh_installdocs
-       dh_installchangelogs
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary-arch: install-arch
-       dh_testdir
-       dh_testroot
-       dh_installdocs -a
-       dh_installman -a
-       dh_installchangelogs -a
-       dh_strip -a --dbg-package=libspeex-dbg
-       dh_compress -a
-       dh_fixperms -a
-       dh_makeshlibs -plibspeex1 -V"libspeex1 (>= 1.2~beta3-1)"
-       dh_makeshlibs -plibspeexdsp1 -V"libspeexdsp1 (>= 1.2~beta3.2-1)"
-       dh_installdeb -a
-       dh_shlibdeps -a
-       dh_gencontrol -a
-       dh_md5sums -a
-       dh_builddeb -a
-
 
-.PHONY: clean build build-arch build-indep install install-arch install-indep
\
-       binary binary-arch binary-indep
+execute_after_dh_installdocs-indep:
+       dh_doxygen
 
+override_dh_strip:
+       dh_strip --dbgsym-migration='libspeex-dbg (<< 1.2~rc1.2-2~)'
diff -Nru speex-1.2~rc1.2/debian/source/format speex-
1.2~rc1.2/debian/source/format
--- speex-1.2~rc1.2/debian/source/format        1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/source/format        2022-02-24 12:26:38.000000000
-0500
@@ -0,0 +1 @@
+3.0 (quilt)
diff -Nru speex-1.2~rc1.2/debian/speex-doc.doc-base speex-
1.2~rc1.2/debian/speex-doc.doc-base
--- speex-1.2~rc1.2/debian/speex-doc.doc-base   2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/debian/speex-doc.doc-base   2022-02-24 12:55:10.000000000
-0500
@@ -8,8 +8,8 @@
 Section: Programming/C
 
 Format: PDF
-Files: /usr/share/doc/speex-doc/manual.pdf.gz
+Files: /usr/share/doc/speex/manual.pdf.gz
 
 Format: HTML
-Index: /usr/share/doc/speex-doc/html/index.html
-Files: /usr/share/doc/speex-doc/html/*
+Index: /usr/share/doc/speex/html/index.html
+Files: /usr/share/doc/speex/html/*
diff -Nru speex-1.2~rc1.2/debian/speex-doc.manpages speex-
1.2~rc1.2/debian/speex-doc.manpages
--- speex-1.2~rc1.2/debian/speex-doc.manpages   2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/debian/speex-doc.manpages   1969-12-31 19:00:00.000000000
-0500
@@ -1 +0,0 @@
-doc/man/man3/*
diff -Nru speex-1.2~rc1.2/debian/speex.install speex-
1.2~rc1.2/debian/speex.install
--- speex-1.2~rc1.2/debian/speex.install        2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/debian/speex.install        2022-02-24 12:45:43.000000000
-0500
@@ -1 +1,2 @@
 usr/bin
+usr/share/man/man1/
diff -Nru speex-1.2~rc1.2/debian/speex.manpages speex-
1.2~rc1.2/debian/speex.manpages
--- speex-1.2~rc1.2/debian/speex.manpages       2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/debian/speex.manpages       1969-12-31 19:00:00.000000000
-0500
@@ -1 +0,0 @@
-src/*.1
diff -Nru speex-1.2~rc1.2/debian/upstream/metadata speex-
1.2~rc1.2/debian/upstream/metadata
--- speex-1.2~rc1.2/debian/upstream/metadata    1969-12-31 19:00:00.000000000
-0500
+++ speex-1.2~rc1.2/debian/upstream/metadata    2022-02-24 12:26:46.000000000
-0500
@@ -0,0 +1,2 @@
+---
+Repository: https://gitlab.xiph.org/xiph/speex
diff -Nru speex-1.2~rc1.2/libspeex/resample.c speex-
1.2~rc1.2/libspeex/resample.c
--- speex-1.2~rc1.2/libspeex/resample.c 2022-02-24 13:15:44.000000000 -0500
+++ speex-1.2~rc1.2/libspeex/resample.c 2014-08-26 06:35:22.000000000 -0400
@@ -561,8 +561,8 @@
       st->cutoff = quality_map[st->quality].downsample_bandwidth * st-
>den_rate / st->num_rate;
       /* FIXME: divide the numerator and denominator by a certain amount if
they're too large */
       st->filt_len = st->filt_len*st->num_rate / st->den_rate;
-      /* Round up to make sure we have a multiple of 8 for SSE */
-      st->filt_len = ((st->filt_len-1)&(~0x7))+8;
+      /* Round down to make sure we have a multiple of 4 */
+      st->filt_len &= (~0x3);
       if (2*st->den_rate < st->num_rate)
          st->oversample >>= 1;
       if (4*st->den_rate < st->num_rate)
@@ -579,7 +579,7 @@
    }
    
    /* Choose the resampling type that requires the least amount of memory */
-   if (st->filt_len*st->den_rate <= st->filt_len*st->oversample+8)
+   if (st->den_rate <= st->oversample)
    {
       spx_uint32_t i;
       if (!st->sinc_table)
@@ -756,9 +756,9 @@
 #endif
    
    /* Per channel data */
-   st->last_sample =
(spx_int32_t*)speex_alloc(nb_channels*sizeof(spx_int32_t));
-   st->magic_samples =
(spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
-   st->samp_frac_num =
(spx_uint32_t*)speex_alloc(nb_channels*sizeof(spx_uint32_t));
+   st->last_sample = (spx_int32_t*)speex_alloc(nb_channels*sizeof(int));
+   st->magic_samples = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
+   st->samp_frac_num = (spx_uint32_t*)speex_alloc(nb_channels*sizeof(int));
    for (i=0;i<nb_channels;i++)
    {
       st->last_sample[i] = 0;
@@ -954,15 +954,13 @@
 {
    spx_uint32_t i;
    int istride_save, ostride_save;
-   spx_uint32_t bak_out_len = *out_len;
-   spx_uint32_t bak_in_len = *in_len;
+   spx_uint32_t bak_len = *out_len;
    istride_save = st->in_stride;
    ostride_save = st->out_stride;
    st->in_stride = st->out_stride = st->nb_channels;
    for (i=0;i<st->nb_channels;i++)
    {
-      *out_len = bak_out_len;
-      *in_len = bak_in_len;
+      *out_len = bak_len;
       if (in != NULL)
          speex_resampler_process_float(st, i, in+i, in_len, out+i, out_len);
       else
@@ -977,15 +975,13 @@
 {
    spx_uint32_t i;
    int istride_save, ostride_save;
-   spx_uint32_t bak_out_len = *out_len;
-   spx_uint32_t bak_in_len = *in_len;
+   spx_uint32_t bak_len = *out_len;
    istride_save = st->in_stride;
    ostride_save = st->out_stride;
    st->in_stride = st->out_stride = st->nb_channels;
    for (i=0;i<st->nb_channels;i++)
    {
-      *out_len = bak_out_len;
-      *in_len = bak_in_len;
+      *out_len = bak_len;
       if (in != NULL)
          speex_resampler_process_int(st, i, in+i, in_len, out+i, out_len);
       else
diff -Nru speex-1.2~rc1.2/libspeex/speex_header.c speex-
1.2~rc1.2/libspeex/speex_header.c
--- speex-1.2~rc1.2/libspeex/speex_header.c     2022-02-24 13:15:44.000000000
-0500
+++ speex-1.2~rc1.2/libspeex/speex_header.c     2014-08-26 06:35:22.000000000
-0400
@@ -147,21 +147,20 @@
    int i;
    SpeexHeader *le_header;
    const char *h = "Speex   ";
-
-   /*FIXME: Do we allow larger headers?*/
-   if (size < (int)sizeof(SpeexHeader))
-   {
-      speex_notify("Speex header too small");
-      return NULL;
-   }
-
    for (i=0;i<8;i++)
       if (packet[i]!=h[i])
       {
          speex_notify("This doesn't look like a Speex file");
          return NULL;
       }
-
+   
+   /*FIXME: Do we allow larger headers?*/
+   if (size < (int)sizeof(SpeexHeader))
+   {
+      speex_notify("Speex header too small");
+      return NULL;
+   }
+   
    le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader));
    
    SPEEX_COPY(le_header, (SpeexHeader*)packet, 1);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to