alsa-plugins_1.2.2.bb 7.8 KB

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