M7350/oe-core/meta/recipes-multimedia/pulseaudio/pulseaudio.inc

158 lines
6.7 KiB
PHP
Raw Permalink Normal View History

2024-09-09 08:57:42 +00:00
SUMMARY = "Sound server for Linux and Unix-like operating systems"
2024-09-09 08:52:07 +00:00
HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
LICENSE = "GPLv2+ & LGPLv2.1"
LIC_FILES_CHKSUM = "file://GPL;md5=4325afd396febcb659c36b49533135d4 \
file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
2024-09-09 08:57:42 +00:00
file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
DEPENDS = "libatomics-ops liboil libsndfile1 libtool"
2024-09-09 08:52:07 +00:00
# optional
2024-09-09 08:57:42 +00:00
DEPENDS += "udev alsa-lib glib-2.0 dbus gconf"
DEPENDS += "json-c gdbm speex libxml-parser-perl-native libcap"
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
inherit autotools pkgconfig useradd gettext perlnative bluetooth systemd
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
# *.desktop rules wont be generated during configure and build will fail
# if using --disable-nls
USE_NLS = "yes"
2024-09-09 08:52:07 +00:00
EXTRA_OECONF = "\
2024-09-09 08:57:42 +00:00
--disable-hal-compat \
--disable-orc \
--enable-tcpwrap=no \
2024-09-09 08:52:07 +00:00
--with-access-group=audio \
2024-09-09 08:57:42 +00:00
--disable-openssl \
--disable-xen \
--with-database=simple \
--without-fftw \
--without-zsh-completion-dir \
--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \
ac_cv_header_valgrind_memcheck_h=no \
2024-09-09 08:52:07 +00:00
"
2024-09-09 08:57:42 +00:00
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)}"
PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc"
PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc"
PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono"
PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3"
PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal,--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd"
PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxtst libice libsm libxcb"
PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
2024-09-09 08:52:07 +00:00
export TARGET_PFPU = "${TARGET_FPU}"
# TODO: Use more fine granular version
#OE_LT_RPATH_ALLOW=":${libdir}/pulse-0.9:"
OE_LT_RPATH_ALLOW = "any"
OE_LT_RPATH_ALLOW[export]="1"
do_install_append() {
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/volatiles.04_pulse
2024-09-09 08:57:42 +00:00
if [ "x${TARGET_PFPU}" = "xsoft" ] ; then
2024-09-09 08:52:07 +00:00
sed -i -e s:\;\ resample-method\ =\ sinc-fastest:resample-method\ =\ trivial: ${D}${sysconfdir}/pulse/daemon.conf
fi
}
USERADD_PACKAGES = "pulseaudio-server"
GROUPADD_PARAM_pulseaudio-server = "pulse"
USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \
--no-create-home --shell /bin/false \
--groups audio,pulse --gid pulse pulse"
2024-09-09 08:57:42 +00:00
# The console-kit module is included here explicitly so bitbake can map to the
# RDEPENDS we define for it in this recipe, and thereby ensure that when
# adding the console-kit module to an image, we also get the necessary
# consolekit package produced.
PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \
pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'pulseaudio-module-console-kit', '', d)}"
2024-09-09 08:52:07 +00:00
#upgrade path:
RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf"
2024-09-09 08:57:42 +00:00
PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
2024-09-09 08:52:07 +00:00
FILES_libpulsecore = "${libdir}/libpulsecore*.so"
2024-09-09 08:57:42 +00:00
FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
2024-09-09 08:52:07 +00:00
FILES_libpulse = "${libdir}/libpulse.so.*"
FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*"
FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
2024-09-09 08:57:42 +00:00
2024-09-09 08:52:07 +00:00
FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \
${libdir}/pulse-${PV}/modules/.debug"
2024-09-09 08:57:42 +00:00
FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"
2024-09-09 08:52:07 +00:00
FILES_${PN}-conf = "${sysconfdir}"
2024-09-09 08:57:42 +00:00
FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules"
#SYSTEMD_PACKAGES = "${PN}-server"
SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service"
FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
2024-09-09 08:52:07 +00:00
# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
ALLOW_EMPTY_${PN} = "1"
CONFFILES_pulseaudio-server = "\
${sysconfdir}/pulse/default.pa \
${sysconfdir}/pulse/daemon.conf \
${sysconfdir}/pulse/client.conf \
"
pkg_postinst_${PN}-server() {
2024-09-09 08:57:42 +00:00
if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
2024-09-09 08:52:07 +00:00
${sysconfdir}/init.d/populate-volatile.sh update
fi
}
python populate_packages_prepend() {
2024-09-09 08:57:42 +00:00
#d.setVar('PKG_pulseaudio', 'pulseaudio')
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
plugindir = d.expand('${libdir}/pulse-${PV}/modules/')
do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
2024-09-09 08:52:07 +00:00
}
RDEPENDS_pulseaudio-server = " \
pulseaudio-module-filter-apply \
pulseaudio-module-filter-heuristics \
pulseaudio-module-udev-detect \
pulseaudio-module-null-sink \
pulseaudio-module-device-restore \
pulseaudio-module-stream-restore \
pulseaudio-module-card-restore \
pulseaudio-module-augment-properties \
pulseaudio-module-detect \
pulseaudio-module-alsa-sink \
pulseaudio-module-alsa-source \
pulseaudio-module-alsa-card \
pulseaudio-module-native-protocol-unix \
pulseaudio-module-default-device-restore \
pulseaudio-module-intended-roles \
pulseaudio-module-rescue-streams \
pulseaudio-module-always-sink \
pulseaudio-module-suspend-on-idle \
pulseaudio-module-position-event-sounds \
2024-09-09 08:57:42 +00:00
pulseaudio-module-role-cork \
pulseaudio-module-switch-on-port-available"
RDEPENDS_pulseaudio-module-console-kit =+ "consolekit"
RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper"
FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
RDEPENDS_pulseaudio-server += "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'pulseaudio-module-console-kit', '', d)}"