commit:     d2f78c951d193dfff031cb9cad4057c856a2d0be
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 22:19:39 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 22:21:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2f78c95

media-libs/speexdsp: Fix speexdsp_config_types.h

Thanks-to: Arfrever
Closes: https://bugs.gentoo.org/622288
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../files/speexdsp-1.2_rc3-config_types.h.patch    | 61 ++++++++++++++++++++++
 media-libs/speexdsp/speexdsp-1.2_rc3-r1.ebuild     | 57 ++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/media-libs/speexdsp/files/speexdsp-1.2_rc3-config_types.h.patch 
b/media-libs/speexdsp/files/speexdsp-1.2_rc3-config_types.h.patch
new file mode 100644
index 00000000000..835769dde70
--- /dev/null
+++ b/media-libs/speexdsp/files/speexdsp-1.2_rc3-config_types.h.patch
@@ -0,0 +1,61 @@
+From c470e2e89a6ca75b507437467692cd684b71a526 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanu.kaski...@linux.intel.com>
+Date: Sun, 5 Jul 2015 18:10:19 +0300
+Subject: [PATCH] Don't rely on HAVE_STDINT_H et al. being defined
+
+Not everyone who includes speexdsp_config_types.h will have a test
+which defines those, and if we've chosen to use the stdint types at
+configure time then we know exactly which header(s) are available, so
+just choose the best one then and generate the header to use it.
+
+This patch, including the above text, is copied from a commit in the
+speex repository[1]. The original commit for speex was made by Ron
+<r...@debian.org>.
+
+[1] 
https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87
+
+Signed-off-by: Tanu Kaskinen <tanu.kaski...@linux.intel.com>
+---
+ configure.ac                             | 6 ++++++
+ include/speex/speexdsp_config_types.h.in | 8 +-------
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2cd2d1e..1de0c23 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -334,6 +334,12 @@ AC_SUBST([USIZE16])
+ AC_SUBST([SIZE32])
+ AC_SUBST([USIZE32])
+ 
++AS_IF([test "$ac_cv_header_stdint_h" = "yes"],    [INCLUDE_STDINT="#include 
<stdint.h>"],
++      [test "$ac_cv_header_inttypes_h" = "yes"],  [INCLUDE_STDINT="#include 
<inttypes.h>"],
++      [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include 
<sys/types.h>"])
++
++AC_SUBST([INCLUDE_STDINT])
++
+ AC_CONFIG_FILES([
+            Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec
+            include/Makefile include/speex/Makefile speexdsp.pc
+diff --git a/include/speex/speexdsp_config_types.h.in 
b/include/speex/speexdsp_config_types.h.in
+index 02b82fd..5ea7b55 100644
+--- a/include/speex/speexdsp_config_types.h.in
++++ b/include/speex/speexdsp_config_types.h.in
+@@ -1,13 +1,7 @@
+ #ifndef __SPEEX_TYPES_H__
+ #define __SPEEX_TYPES_H__
+ 
+-#if defined HAVE_STDINT_H
+-#  include <stdint.h>
+-#elif defined HAVE_INTTYPES_H
+-#  include <inttypes.h>
+-#elif defined HAVE_SYS_TYPES_H
+-#  include <sys/types.h>
+-#endif
++@INCLUDE_STDINT@
+ 
+ typedef @SIZE16@ spx_int16_t;
+ typedef @USIZE16@ spx_uint16_t;
+-- 
+2.1.4
+

diff --git a/media-libs/speexdsp/speexdsp-1.2_rc3-r1.ebuild 
b/media-libs/speexdsp/speexdsp-1.2_rc3-r1.ebuild
new file mode 100644
index 00000000000..b8f99c5a28a
--- /dev/null
+++ b/media-libs/speexdsp/speexdsp-1.2_rc3-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools flag-o-matic multilib-minimal
+
+MY_P=${P/_}
+MY_P=${MY_P/_p/.}
+
+DESCRIPTION="Audio compression format designed for speech -- DSP"
+HOMEPAGE="https://www.speex.org/";
+SRC_URI="https://downloads.xiph.org/releases/speex/${MY_P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc 
~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos 
~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_arm_neon static-libs"
+
+RDEPEND="!<media-libs/speex-1.2.0"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+       "${FILESDIR}/${P}-configure.patch"
+       "${FILESDIR}/${P}-config_types.h.patch"
+)
+
+src_prepare() {
+       default
+
+       sed -i \
+               -e 's:noinst_PROGRAMS:check_PROGRAMS:' \
+               libspeexdsp/Makefile.am || die
+
+       eautoreconf
+}
+
+multilib_src_configure() {
+       append-lfs-flags
+
+       # Can also be configured with one of:
+       # --enable-fixed-point             (no floating point)
+       # --with-fft=proprietary-intel-mkl (mkl)
+       # --with-fft=gpl-fftw3             (fftw)
+       ECONF_SOURCE="${S}" econf \
+               $(use_enable static-libs static) \
+               $(use_enable cpu_flags_x86_sse sse) \
+               $(use_enable cpu_flags_x86_sse2 sse2) \
+               $(use_enable cpu_flags_arm_neon neon)
+}
+
+multilib_src_install_all() {
+       default
+       find "${D}" -name '*.la' -delete || die
+}

Reply via email to