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