Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "ALSA Plugins" |
| 2 | HOMEPAGE = "http://alsa-project.org" |
| 3 | BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" |
| 4 | SECTION = "multimedia" |
| 5 | |
| 6 | # The primary license of alsa-plugins is LGPLv2.1. |
| 7 | # |
| 8 | # m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the |
| 9 | # build system, and doesn't affect the licensing of the build result. |
| 10 | # |
| 11 | # The samplerate plugin source code is licensed under GPLv2+ to be consistent |
| 12 | # with the libsamplerate license. However, if the licensee has a commercial |
| 13 | # license for libsamplerate, the samplerate plugin may be used under the terms |
| 14 | # of LGPLv2.1 like the rest of the plugins. |
| 15 | LICENSE = "LGPLv2.1 & GPLv2+" |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 16 | LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ |
| 17 | file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ |
| 18 | file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \ |
| 19 | file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ |
| 20 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | |
| 22 | SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 23 | SRC_URI[md5sum] = "8455e3c6fbc47f62f070afabc14ba575" |
| 24 | SRC_URI[sha256sum] = "1c0f06450c928d711719686c9dbece2d480184f36fab11b8f0534cb7b41e337d" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | |
| 26 | DEPENDS += "alsa-lib" |
| 27 | |
| 28 | inherit autotools pkgconfig |
| 29 | |
| 30 | PACKAGECONFIG ??= "\ |
| 31 | samplerate \ |
| 32 | speexdsp \ |
| 33 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ |
| 34 | " |
| 35 | PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp" |
| 36 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" |
| 37 | PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav" |
| 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 | FILES_${PN} = "" |
| 51 | ALLOW_EMPTY_${PN} = "1" |
| 52 | |
| 53 | do_install_append() { |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame^] | 54 | rm -f ${D}${libdir}/alsa-lib/*.la |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | |
| 56 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then |
| 57 | # We use the example as is. Upstream installs the file under |
| 58 | # /etc, but we move it under /usr/share and add a symlink under |
| 59 | # /etc to be consistent with other installed configuration |
| 60 | # files. |
| 61 | mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf |
| 62 | ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf |
| 63 | fi |
| 64 | } |
| 65 | |
| 66 | python populate_packages_prepend() { |
| 67 | plugindir = d.expand('${libdir}/alsa-lib/') |
| 68 | packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) |
| 69 | d.setVar("RDEPENDS_alsa-plugins", packages) |
| 70 | } |
| 71 | |
| 72 | # Many plugins have a configuration file (plus a symlink in /etc) associated |
| 73 | # with them. We put the plugin and it's configuration usually in the same |
| 74 | # package, but that's problematic when the configuration file is related to |
| 75 | # multiple plugins, as is the case with the pulse, oss and maemo plugins. In |
| 76 | # case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf |
| 77 | # package that depends on all the pulse plugins, which ensures that all plugins |
| 78 | # that the configuration references are installed. The oss and maemo |
| 79 | # configuration files, on the other hand, are in the respective pcm plugin |
| 80 | # packages. Therefore it's possible to install the configuration file without |
| 81 | # the ctl plugin that the configuration file references. This is unlikely to |
| 82 | # cause big problems, but some kind of improvement to the packaging could |
| 83 | # probably be done here (at least it would be good to handle the different |
| 84 | # plugins in a consistent way). |
| 85 | FILES_${MLPREFIX}libasound-module-ctl-arcam-av += "\ |
| 86 | ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \ |
| 87 | ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \ |
| 88 | " |
| 89 | FILES_${MLPREFIX}libasound-module-pcm-a52 += "\ |
| 90 | ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \ |
| 91 | ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \ |
| 92 | " |
| 93 | FILES_${MLPREFIX}libasound-module-pcm-alsa-dsp += "\ |
| 94 | ${datadir}/alsa/alsa.conf.d/98-maemo.conf \ |
| 95 | ${sysconfdir}/alsa/conf.d/98-maemo.conf \ |
| 96 | " |
| 97 | FILES_${MLPREFIX}libasound-module-pcm-jack += "\ |
| 98 | ${datadir}/alsa/alsa.conf.d/50-jack.conf \ |
| 99 | ${sysconfdir}/alsa/conf.d/50-jack.conf \ |
| 100 | " |
| 101 | FILES_${MLPREFIX}libasound-module-pcm-oss += "\ |
| 102 | ${datadir}/alsa/alsa.conf.d/50-oss.conf \ |
| 103 | ${sysconfdir}/alsa/conf.d/50-oss.conf \ |
| 104 | " |
| 105 | FILES_${MLPREFIX}libasound-module-pcm-speex += "\ |
| 106 | ${datadir}/alsa/alsa.conf.d/60-speex.conf \ |
| 107 | ${sysconfdir}/alsa/conf.d/60-speex.conf \ |
| 108 | " |
| 109 | FILES_${MLPREFIX}libasound-module-pcm-upmix += "\ |
| 110 | ${datadir}/alsa/alsa.conf.d/60-upmix.conf \ |
| 111 | ${sysconfdir}/alsa/conf.d/60-upmix.conf \ |
| 112 | " |
| 113 | FILES_${MLPREFIX}libasound-module-pcm-usb-stream += "\ |
| 114 | ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \ |
| 115 | ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \ |
| 116 | " |
| 117 | FILES_${MLPREFIX}libasound-module-pcm-vdownmix += "\ |
| 118 | ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \ |
| 119 | ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \ |
| 120 | " |
| 121 | FILES_${MLPREFIX}libasound-module-rate-lavrate += "\ |
| 122 | ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \ |
| 123 | ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \ |
| 124 | " |
| 125 | FILES_${MLPREFIX}libasound-module-rate-samplerate += "\ |
| 126 | ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \ |
| 127 | ${sysconfdir}/alsa/conf.d/10-samplerate.conf \ |
| 128 | " |
| 129 | FILES_${MLPREFIX}libasound-module-rate-speexrate += "\ |
| 130 | ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \ |
| 131 | ${sysconfdir}/alsa/conf.d/10-speexrate.conf \ |
| 132 | " |
| 133 | |
| 134 | # The rate plugins create some symlinks. For example, the samplerate plugin |
| 135 | # creates these links to the main plugin file: |
| 136 | # |
| 137 | # libasound_module_rate_samplerate_best.so |
| 138 | # libasound_module_rate_samplerate_linear.so |
| 139 | # libasound_module_rate_samplerate_medium.so |
| 140 | # libasound_module_rate_samplerate_order.so |
| 141 | # |
| 142 | # The other rate plugins create similar links. We have to add the links to |
| 143 | # FILES manually, because do_split_packages() skips the links (which is good, |
| 144 | # because we wouldn't want do_split_packages() to create separate packages for |
| 145 | # the symlinks). |
| 146 | # |
| 147 | # The symlinks cause QA errors, because usually it's a bug if a non |
| 148 | # -dev/-dbg/-nativesdk package contains links to .so files, but in this case |
| 149 | # the errors are false positives, so we disable the QA checks. |
| 150 | FILES_${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so" |
| 151 | FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" |
| 152 | FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" |
| 153 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavrate = "dev-so" |
| 154 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" |
| 155 | INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" |
| 156 | |
| 157 | # 50-pulseaudio.conf defines a device named "pulse" that applications can use |
| 158 | # if they explicitly want to use the PulseAudio plugin. |
| 159 | # 99-pulseaudio-default.conf configures the "default" device to use the |
| 160 | # PulseAudio plugin. |
| 161 | FILES_${PN}-pulseaudio-conf += "\ |
| 162 | ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ |
| 163 | ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ |
| 164 | ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \ |
| 165 | ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \ |
| 166 | " |
| 167 | |
| 168 | RDEPENDS_${PN}-pulseaudio-conf += "\ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 169 | ${MLPREFIX}libasound-module-conf-pulse \ |
| 170 | ${MLPREFIX}libasound-module-ctl-pulse \ |
| 171 | ${MLPREFIX}libasound-module-pcm-pulse \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 172 | " |