blob: fec6575309204f280e8396201b1b6acd5bc29d01 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "ALSA Plugins"
2HOMEPAGE = "http://alsa-project.org"
3SECTION = "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.
14LICENSE = "LGPLv2.1 & GPLv2+"
15LIC_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
22SRC_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"
26SRC_URI[md5sum] = "b123e42ed881b9adbc99e4040f257c39"
27SRC_URI[sha256sum] = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee"
28
29DEPENDS += "alsa-lib"
30
31inherit autotools pkgconfig
32
33PACKAGECONFIG ??= "\
34 samplerate \
35 speexdsp \
36 ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
37"
38PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
39PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
40PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
41PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
42PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
43PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
44PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
45
46PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
47
48PACKAGES_DYNAMIC = "^libasound-module-.*"
49
50# The alsa-plugins package doesn't itself contain anything, it just depends on
51# all built plugins.
52ALLOW_EMPTY_${PN} = "1"
53
54do_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
63python 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.
85FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
86FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
87FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
88INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
89INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
90INSANE_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.
96FILES_${PN}-pulseaudio-conf += "\
97 ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
98 ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
99"
100
101RDEPENDS_${PN}-pulseaudio-conf += "\
102 libasound-module-conf-pulse \
103 libasound-module-ctl-pulse \
104 libasound-module-pcm-pulse \
105"