Gentoo Archives: gentoo-commits

From: "Christian Faulhammer (fauli)" <fauli@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-plugins/alsa-plugins/files: alsa-plugins-1.0.19-speex.patch
Date: Thu, 02 Jul 2009 09:58:05
Message-Id: E1MMJ3K-0001Mm-37@stork.gentoo.org
1 fauli 09/07/02 09:58:02
2
3 Added: alsa-plugins-1.0.19-speex.patch
4 Log:
5 fix compilation with USE=speex enabled, thanks for Pacho Ramos for providing the patch on bug 272682
6 (Portage version: 2.1.6.13/cvs/Linux i686)
7
8 Revision Changes Path
9 1.1 media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-speex.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-speex.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-speex.patch?rev=1.1&content-type=text/plain
13
14 Index: alsa-plugins-1.0.19-speex.patch
15 ===================================================================
16 From: Takashi Iwai <tiwai@××××.de>
17 Date: Wed, 21 Jan 2009 15:53:36 +0000 (+0100)
18 Subject: Fix build of pph plugin with speex-1.2rc1
19 X-Git-Tag: v1.0.20~10
20 X-Git-Url: http://git.alsa-project.org/?p=alsa-plugins.git;a=commitdiff_plain;h=ba7cd8e0a04798479f851741ec29fef97889aa39;hp=c547b535a20a0909c17cb6dd14e5e364b2ae0fe9
21
22 Fix build of pph plugin with speex-1.2rc1
23
24 The resampler code is moved to libspeexdsp instead of libspeex.
25
26 Signed-off-by: Takashi Iwai <tiwai@××××.de>
27 ---
28
29 diff --git a/configure.in b/configure.in
30 index 837934f..ce95b5d 100644
31 --- a/configure.in
32 +++ b/configure.in
33 @@ -106,16 +106,18 @@ AC_SUBST(AVCODEC_CFLAGS)
34 AC_SUBST(AVCODEC_LIBS)
35 AC_SUBST(AVCODEC_HEADER)
36
37 -USE_LIBSPEEX=""
38 +PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
39 +AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
40 +
41 AC_ARG_WITH([speex],
42 AS_HELP_STRING([--with-speex={builtin|lib|no}],
43 [build speex resampler (built-in code, link with external lib, or no build)]),
44 [PPH=$withval], [PPH="lib"])
45
46 +USE_LIBSPEEX=""
47 if test "$PPH" = "lib"; then
48 - PKG_CHECK_MODULES(speex, [speex >= 1.2], [USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
49 - if test "$USE_LIBSPEEX" = "yes"; then
50 - AC_CHECK_LIB([speex], [speex_resampler_init],
51 + if test "$HAVE_SPEEXDSP" = "yes"; then
52 + AC_CHECK_LIB([speexdsp], [speex_resampler_init],
53 [USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
54 fi
55 if test "$USE_LIBSPEEX" = "yes"; then
56 @@ -197,6 +199,6 @@ if test "$HAVE_AVCODEC" = "yes"; then
57 fi
58 echo "Speex rate plugin: $PPH"
59 if test "$PPH" = "lib"; then
60 - echo " speex_CFLAGS: $speex_CFLAGS"
61 - echo " speex_LIBS: $speex_LIBS"
62 + echo " speexdsp_CFLAGS: $speexdsp_CFLAGS"
63 + echo " speexdsp_LIBS: $speexdsp_LIBS"
64 fi
65 diff --git a/pph/Makefile.am b/pph/Makefile.am
66 index d24176c..551e5bd 100644
67 --- a/pph/Makefile.am
68 +++ b/pph/Makefile.am
69 @@ -2,15 +2,16 @@ asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la
70
71 asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@
72
73 -AM_CFLAGS = -DVAR_ARRAYS -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX -Wall -g @ALSA_CFLAGS@
74 +AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@
75 AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED)
76
77 libasound_module_rate_speexrate_la_SOURCES = rate_speexrate.c
78 libasound_module_rate_speexrate_la_LIBADD = @ALSA_LIBS@
79 if USE_LIBSPEEX
80 -AM_CFLAGS += @speex_CFLAGS@
81 -libasound_module_rate_speexrate_la_LIBADD += @speex_LIBS@
82 +AM_CFLAGS += @speexdsp_CFLAGS@
83 +libasound_module_rate_speexrate_la_LIBADD += @speexdsp_LIBS@
84 else
85 +AM_CFLAGS += -DRANDOM_PREFIX=alsa_lib -DOUTSIDE_SPEEX
86 libasound_module_rate_speexrate_la_SOURCES += resample.c
87 libasound_module_rate_speexrate_la_LIBADD += -lm
88 endif