From d2f78c951d193dfff031cb9cad4057c856a2d0be Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 17 Dec 2017 23:19:39 +0100 Subject: [PATCH] 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 --- .../speexdsp-1.2_rc3-config_types.h.patch | 61 +++++++++++++++++++ .../speexdsp/speexdsp-1.2_rc3-r1.ebuild | 57 +++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 media-libs/speexdsp/files/speexdsp-1.2_rc3-config_types.h.patch create mode 100644 media-libs/speexdsp/speexdsp-1.2_rc3-r1.ebuild 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 000000000000..835769dde707 --- /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 +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 +. + +[1] https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87 + +Signed-off-by: Tanu Kaskinen +--- + 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 "], ++ [test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include "], ++ [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include "]) ++ ++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 +-#elif defined HAVE_INTTYPES_H +-# include +-#elif defined HAVE_SYS_TYPES_H +-# include +-#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 000000000000..b8f99c5a28a6 --- /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="!