diff options
Diffstat (limited to 'meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb')
-rw-r--r-- | meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb new file mode 100644 index 0000000000..fec6575309 --- /dev/null +++ b/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb | |||
@@ -0,0 +1,105 @@ | |||
1 | SUMMARY = "ALSA Plugins" | ||
2 | HOMEPAGE = "http://alsa-project.org" | ||
3 | SECTION = "multimedia" | ||
4 | |||
5 | # The primary license of alsa-plugins is LGPLv2.1. | ||
6 | # | ||
7 | # m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the | ||
8 | # build system, and doesn't affect the licensing of the build result. | ||
9 | # | ||
10 | # The samplerate plugin source code is licensed under GPLv2+ to be consistent | ||
11 | # with the libsamplerate license. However, if the licensee has a commercial | ||
12 | # license for libsamplerate, the samplerate plugin may be used under the terms | ||
13 | # of LGPLv2.1 like the rest of the plugins. | ||
14 | LICENSE = "LGPLv2.1 & GPLv2+" | ||
15 | LIC_FILES_CHKSUM = "\ | ||
16 | file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ | ||
17 | file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
18 | file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ | ||
19 | file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ | ||
20 | " | ||
21 | |||
22 | SRC_URI = "\ | ||
23 | ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \ | ||
24 | file://0001-pph-include-config.h-from-rate_speexrate.c.patch \ | ||
25 | " | ||
26 | SRC_URI[md5sum] = "b123e42ed881b9adbc99e4040f257c39" | ||
27 | SRC_URI[sha256sum] = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee" | ||
28 | |||
29 | DEPENDS += "alsa-lib" | ||
30 | |||
31 | inherit autotools pkgconfig | ||
32 | |||
33 | PACKAGECONFIG ??= "\ | ||
34 | samplerate \ | ||
35 | speexdsp \ | ||
36 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ | ||
37 | " | ||
38 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav" | ||
39 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | ||
40 | PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" | ||
41 | PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" | ||
42 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" | ||
43 | PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" | ||
44 | PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" | ||
45 | |||
46 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" | ||
47 | |||
48 | PACKAGES_DYNAMIC = "^libasound-module-.*" | ||
49 | |||
50 | # The alsa-plugins package doesn't itself contain anything, it just depends on | ||
51 | # all built plugins. | ||
52 | ALLOW_EMPTY_${PN} = "1" | ||
53 | |||
54 | do_install_append() { | ||
55 | rm ${D}${libdir}/alsa-lib/*.la | ||
56 | |||
57 | # We use the example as is, so just drop the .example suffix. | ||
58 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then | ||
59 | mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf | ||
60 | fi | ||
61 | } | ||
62 | |||
63 | python populate_packages_prepend() { | ||
64 | plugindir = bb.data.expand('${libdir}/alsa-lib/', d) | ||
65 | packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) | ||
66 | d.setVar("RDEPENDS_alsa-plugins", packages) | ||
67 | } | ||
68 | |||
69 | # The rate plugins create some symlinks. For example, the samplerate plugin | ||
70 | # creates these links to the main plugin file: | ||
71 | # | ||
72 | # libasound_module_rate_samplerate_best.so | ||
73 | # libasound_module_rate_samplerate_linear.so | ||
74 | # libasound_module_rate_samplerate_medium.so | ||
75 | # libasound_module_rate_samplerate_order.so | ||
76 | # | ||
77 | # The other rate plugins create similar links. We have to add the links to | ||
78 | # FILES manually, because do_split_packages() skips the links (which is good, | ||
79 | # because we wouldn't want do_split_packages() to create separate packages for | ||
80 | # the symlinks). | ||
81 | # | ||
82 | # The symlinks cause QA errors, because usually it's a bug if a non | ||
83 | # -dev/-dbg/-nativesdk package contains links to .so files, but in this case | ||
84 | # the errors are false positives, so we disable the QA checks. | ||
85 | FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so" | ||
86 | FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" | ||
87 | FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" | ||
88 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so" | ||
89 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" | ||
90 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" | ||
91 | |||
92 | # 50-pulseaudio.conf defines a device named "pulse" that applications can use | ||
93 | # if they explicitly want to use the PulseAudio plugin. | ||
94 | # 99-pulseaudio-default.conf configures the "default" device to use the | ||
95 | # PulseAudio plugin. | ||
96 | FILES_${PN}-pulseaudio-conf += "\ | ||
97 | ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ | ||
98 | ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ | ||
99 | " | ||
100 | |||
101 | RDEPENDS_${PN}-pulseaudio-conf += "\ | ||
102 | libasound-module-conf-pulse \ | ||
103 | libasound-module-ctl-pulse \ | ||
104 | libasound-module-pcm-pulse \ | ||
105 | " | ||