Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | DESCRIPTION = "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. |
| 12 | LICENSE = "LGPLv2.1 & GPLv2+" |
| 13 | LIC_FILES_CHKSUM = "\ |
| 14 | file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \ |
| 15 | file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \ |
| 16 | file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ |
| 17 | file://rate/rate_samplerate.c;endline=19;md5=f3d3ce0b189846a486517d97a854b276 \ |
| 18 | " |
| 19 | |
| 20 | SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \ |
| 21 | file://0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch \ |
| 22 | file://0001-include-speexdsp_types.h-not-speex_types.h.patch \ |
| 23 | " |
| 24 | SRC_URI[md5sum] = "a66797b4471e3cbe96575207bfbe252c" |
| 25 | SRC_URI[sha256sum] = "325d85cac285f632b83e0191ae3f348bad03c1f007b937042f164abb81ea6532" |
| 26 | |
| 27 | DEPENDS += "alsa-lib" |
| 28 | |
| 29 | inherit autotools pkgconfig |
| 30 | |
| 31 | PACKAGECONFIG ??= "\ |
| 32 | samplerate \ |
| 33 | speexdsp \ |
| 34 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \ |
| 35 | " |
| 36 | PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav" |
| 37 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 38 | PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" |
| 39 | PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" |
| 40 | PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" |
| 41 | PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" |
| 42 | PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" |
| 43 | |
| 44 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" |
| 45 | |
| 46 | PACKAGES_DYNAMIC = "^libasound-module-.*" |
| 47 | |
| 48 | # The alsa-plugins package doesn't itself contain anything, it just depends on |
| 49 | # all built plugins. |
| 50 | ALLOW_EMPTY_${PN} = "1" |
| 51 | |
| 52 | do_install_append() { |
| 53 | rm ${D}${libdir}/alsa-lib/*.la |
| 54 | |
| 55 | # We use the example as is, so just drop the .example suffix. |
| 56 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then |
| 57 | mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf |
| 58 | fi |
| 59 | } |
| 60 | |
| 61 | python populate_packages_prepend() { |
| 62 | plugindir = bb.data.expand('${libdir}/alsa-lib/', d) |
| 63 | packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) |
| 64 | d.setVar("RDEPENDS_alsa-plugins", packages) |
| 65 | } |
| 66 | |
| 67 | # The rate plugins create some symlinks. For example, the samplerate plugin |
| 68 | # creates these links to the main plugin file: |
| 69 | # |
| 70 | # libasound_module_rate_samplerate_best.so |
| 71 | # libasound_module_rate_samplerate_linear.so |
| 72 | # libasound_module_rate_samplerate_medium.so |
| 73 | # libasound_module_rate_samplerate_order.so |
| 74 | # |
| 75 | # The other rate plugins create similar links. We have to add the links to |
| 76 | # FILES manually, because do_split_packages() skips the links (which is good, |
| 77 | # because we wouldn't want do_split_packages() to create separate packages for |
| 78 | # the symlinks). |
| 79 | # |
| 80 | # The symlinks cause QA errors, because usually it's a bug if a non |
| 81 | # -dev/-dbg/-nativesdk package contains links to .so files, but in this case |
| 82 | # the errors are false positives, so we disable the QA checks. |
| 83 | FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so" |
| 84 | FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" |
| 85 | FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" |
| 86 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so" |
| 87 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" |
| 88 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" |
| 89 | |
| 90 | FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug" |
| 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 | " |