Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,44 @@
SUMMARY = "ALSA sound library"
DESCRIPTION = "(Occasionally a.k.a. libasound) is a userspace library that \
provides a level of abstraction over the /dev interfaces provided by the kernel modules."
HOMEPAGE = "http://www.alsa-project.org"
BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "libs/multimedia"
LICENSE = "LGPL-2.1-only & GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \
"
SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
SRC_URI[sha256sum] = "dc9c643fdc4ccfd0572cc685858dd41e08afb583f30460b317e4188275f615b2"
inherit autotools pkgconfig
EXTRA_OECONF += " \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \
--disable-python --disable-old-symbols \
"
PACKAGES =+ "alsa-server alsa-conf libatopology"
FILES:alsa-server = "${bindir}/*"
FILES:alsa-conf = "${datadir}/alsa/"
FILES:libatopology = "${libdir}/libatopology.so.*"
RDEPENDS:${PN}:class-target = "alsa-conf alsa-ucm-conf"
RDEPENDS:libatopology:class-target = "alsa-topology-conf"
# upgrade path
RPROVIDES:${PN} = "libasound"
RREPLACES:${PN} = "libasound"
RCONFLICTS:${PN} = "libasound"
RPROVIDES:${PN}-dev = "alsa-dev"
RREPLACES:${PN}-dev = "alsa-dev"
RCONFLICTS:${PN}-dev = "alsa-dev"
RPROVIDES:alsa-conf = "alsa-conf-base"
RREPLACES:alsa-conf = "alsa-conf-base"
RCONFLICTS:alsa-conf = "alsa-conf-base"
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,25 @@
From b01b176a665ba65979d74922955f51dc4888a713 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 23 Aug 2022 15:21:16 -0700
Subject: [PATCH] arcam_av.c: Include missing string.h
bzero() function needs this header to be included
Upstream-Status: Submitted [https://github.com/alsa-project/alsa-plugins/pull/47]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
arcam-av/arcam_av.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arcam-av/arcam_av.c b/arcam-av/arcam_av.c
index 63f9b4e..29fc537 100644
--- a/arcam-av/arcam_av.c
+++ b/arcam-av/arcam_av.c
@@ -27,6 +27,7 @@
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
+#include <string.h>
#include <termios.h>
#include <unistd.h>
@@ -0,0 +1,176 @@
SUMMARY = "ALSA Plugins"
DESCRIPTION = "Used to create virtual devices that can be used like normal \
hardware devices but cause extra processing of the sound stream to take place. \
They are used while configuring ALSA in the .asoundrc file."
HOMEPAGE = "http://alsa-project.org"
BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "multimedia"
# The primary license of alsa-plugins is LGPL-2.1-only.
#
# m4/attributes.m4 is licensed under GPL-2.0-or-later. m4/attributes.m4 is part
# of the build system, and doesn't affect the licensing of the build result.
#
# The samplerate plugin source code is licensed under GPL-2.0-or-later to be
# consistent with the libsamplerate license. However, if the licensee has a
# commercial license for libsamplerate, the samplerate plugin may be used under
# the terms of LGPL-2.1-only like the rest of the plugins.
LICENSE = "LGPL-2.1-only & GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \
file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://m4/attributes.m4;endline=33;md5=bb8c6b2a67ac15156961e242fec33e50 \
file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
"
SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2 \
file://0001-arcam_av.c-Include-missing-string.h.patch \
"
SRC_URI[sha256sum] = "8c337814954bb7c167456733a6046142a2931f12eccba3ec2a4ae618a3432511"
DEPENDS += "alsa-lib"
inherit autotools pkgconfig
PACKAGECONFIG ??= "\
samplerate \
speexdsp \
${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
"
PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,libavtp"
PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav"
PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
PACKAGES_DYNAMIC = "^libasound-module-.*"
# The alsa-plugins package doesn't itself contain anything, it just depends on
# all built plugins.
FILES:${PN} = ""
ALLOW_EMPTY:${PN} = "1"
do_install:append() {
rm -f ${D}${libdir}/alsa-lib/*.la
if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
# We use the example as is. Upstream installs the file under
# /etc, but we move it under /usr/share and add a symlink under
# /etc to be consistent with other installed configuration
# files.
mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf
fi
}
python populate_packages:prepend() {
plugindir = d.expand('${libdir}/alsa-lib/')
packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
d.setVar("RDEPENDS:alsa-plugins", packages)
}
# Many plugins have a configuration file (plus a symlink in /etc) associated
# with them. We put the plugin and it's configuration usually in the same
# package, but that's problematic when the configuration file is related to
# multiple plugins, as is the case with the pulse, oss and maemo plugins. In
# case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf
# package that depends on all the pulse plugins, which ensures that all plugins
# that the configuration references are installed. The oss and maemo
# configuration files, on the other hand, are in the respective pcm plugin
# packages. Therefore it's possible to install the configuration file without
# the ctl plugin that the configuration file references. This is unlikely to
# cause big problems, but some kind of improvement to the packaging could
# probably be done here (at least it would be good to handle the different
# plugins in a consistent way).
FILES:${MLPREFIX}libasound-module-ctl-arcam-av += "\
${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \
${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-a52 += "\
${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \
${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-alsa-dsp += "\
${datadir}/alsa/alsa.conf.d/98-maemo.conf \
${sysconfdir}/alsa/conf.d/98-maemo.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-jack += "\
${datadir}/alsa/alsa.conf.d/50-jack.conf \
${sysconfdir}/alsa/conf.d/50-jack.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-oss += "\
${datadir}/alsa/alsa.conf.d/50-oss.conf \
${sysconfdir}/alsa/conf.d/50-oss.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-speex += "\
${datadir}/alsa/alsa.conf.d/60-speex.conf \
${sysconfdir}/alsa/conf.d/60-speex.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-upmix += "\
${datadir}/alsa/alsa.conf.d/60-upmix.conf \
${sysconfdir}/alsa/conf.d/60-upmix.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-usb-stream += "\
${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \
${sysconfdir}/alsa/conf.d/98-usb-stream.conf \
"
FILES:${MLPREFIX}libasound-module-pcm-vdownmix += "\
${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \
${sysconfdir}/alsa/conf.d/60-vdownmix.conf \
"
FILES:${MLPREFIX}libasound-module-rate-lavrate += "\
${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \
${sysconfdir}/alsa/conf.d/10-rate-lav.conf \
"
FILES:${MLPREFIX}libasound-module-rate-samplerate += "\
${datadir}/alsa/alsa.conf.d/10-samplerate.conf \
${sysconfdir}/alsa/conf.d/10-samplerate.conf \
"
FILES:${MLPREFIX}libasound-module-rate-speexrate += "\
${datadir}/alsa/alsa.conf.d/10-speexrate.conf \
${sysconfdir}/alsa/conf.d/10-speexrate.conf \
"
# The rate plugins create some symlinks. For example, the samplerate plugin
# creates these links to the main plugin file:
#
# libasound_module_rate_samplerate_best.so
# libasound_module_rate_samplerate_linear.so
# libasound_module_rate_samplerate_medium.so
# libasound_module_rate_samplerate_order.so
#
# The other rate plugins create similar links. We have to add the links to
# FILES manually, because do_split_packages() skips the links (which is good,
# because we wouldn't want do_split_packages() to create separate packages for
# the symlinks).
#
# The symlinks cause QA errors, because usually it's a bug if a non
# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
# the errors are false positives, so we disable the QA checks.
FILES:${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so"
FILES:${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
FILES:${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
INSANE_SKIP:${MLPREFIX}libasound-module-rate-lavrate = "dev-so"
INSANE_SKIP:${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
INSANE_SKIP:${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
# 50-pulseaudio.conf defines a device named "pulse" that applications can use
# if they explicitly want to use the PulseAudio plugin.
# 99-pulseaudio-default.conf configures the "default" device to use the
# PulseAudio plugin.
FILES:${PN}-pulseaudio-conf += "\
${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \
${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \
"
RDEPENDS:${PN}-pulseaudio-conf += "\
${MLPREFIX}libasound-module-conf-pulse \
${MLPREFIX}libasound-module-ctl-pulse \
${MLPREFIX}libasound-module-pcm-pulse \
"
@@ -0,0 +1,89 @@
SUMMARY = "Advanced tools for certain ALSA sound card drivers"
DESCRIPTION = "Package containing a number of tools ranging from envy24control \
which provides complete control over all devices with an envy24 chip, to \
firmware loaders for pcmcia, USB and the hdsp devices."
HOMEPAGE = "http://www.alsa-project.org"
BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
LICENSE = "GPL-2.0-only & LGPL-2.0-or-later"
DEPENDS = "alsa-lib"
LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \
"
SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2"
SRC_URI[sha256sum] = "35a71027a01f4d7de4722e223520e940de68b3c570b6c671691567ae28f9893e"
inherit autotools-brokensep pkgconfig
# brokensep as as10k1 (and probably more) fail out of tree
CLEANBROKEN = "1"
# Here we use PACKAGECONFIG options to pick which directories we configure/build.
# Remember on upgrades to check that no new tools have been added.
PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \
sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \
${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \
"
PACKAGECONFIG[as10k1] = ""
PACKAGECONFIG[echomixer] = ",,gtk+"
PACKAGECONFIG[envy24control] = ",,gtk+"
PACKAGECONFIG[hda-verb] = ""
PACKAGECONFIG[hdajackretask] = ",,gtk+3"
PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0"
PACKAGECONFIG[hdspconf] = ",,fltk"
PACKAGECONFIG[hdsploader] = ""
PACKAGECONFIG[hdspmixer] = ",,fltk"
PACKAGECONFIG[ld10k1] = ""
PACKAGECONFIG[mixartloader] = ""
PACKAGECONFIG[pcxhrloader] = ""
PACKAGECONFIG[qlo10k1] = ",,qt-x11-free"
PACKAGECONFIG[rmedigicontrol] = ",,gtk+"
PACKAGECONFIG[sb16_csp] = ""
PACKAGECONFIG[seq--sbiload] = ""
PACKAGECONFIG[sscape_ctl] = ""
PACKAGECONFIG[us428control] = ""
PACKAGECONFIG[usx2yloader] = ""
PACKAGECONFIG[vxloader] = ""
# At the time of writing pyalsa is not packaged for OE, so this is not expected
# to work.
PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa"
python do_configure() {
for subdir in d.getVar("PACKAGECONFIG").split():
subdir = subdir.replace("--", "/")
bb.note("Configuring %s" % subdir)
dd = d.createCopy()
dd.setVar("S", os.path.join(d.getVar("S"), subdir))
bb.build.exec_func("autotools_do_configure", dd)
}
python do_compile() {
for subdir in d.getVar("PACKAGECONFIG").split():
subdir = subdir.replace("--", "/")
bb.note("Compiling %s" % subdir)
dd = d.createCopy()
dd.setVar("S", os.path.join(d.getVar("S"), subdir))
bb.build.exec_func("autotools_do_compile", dd)
}
python do_install() {
d.delVarFlag("autotools_do_install", "cleandirs")
for subdir in d.getVar("PACKAGECONFIG").split():
subdir = subdir.replace("--", "/")
bb.note("Installing %s" % subdir)
dd = d.createCopy()
dd.setVar("S", os.path.join(d.getVar("S"), subdir))
bb.build.exec_func("autotools_do_install", dd)
# Just remove bash-needing init script that isn't installed as an init script
try:
os.remove(oe.path.join(d.getVar("D"), d.getVar("sbindir"), "ld10k1d"))
except:
pass
}
FILES:${PN} += "${datadir}"
@@ -0,0 +1,23 @@
SUMMARY = "ALSA topology configuration files"
DESCRIPTION = "Provides a method for audio drivers to load their mixers, \
routing, PCMs and capabilities from user space at runtime without changing \
any driver source code."
HOMEPAGE = "https://alsa-project.org"
BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
SRC_URI[sha256sum] = "f7c5bae1545abcd73824bc97f4e72c340e11abea188ba0f1c06f5e0ad776b179"
# Something went wrong at upstream tarballing
inherit allarch
do_install() {
install -d "${D}${datadir}/alsa"
cp -r "${S}/topology" "${D}${datadir}/alsa"
}
PACKAGES = "${PN}"
FILES:${PN} = "*"
@@ -0,0 +1,24 @@
SUMMARY = "ALSA Use Case Manager configuration"
DESCRIPTION = "This package contains ALSA Use Case Manager configuration \
of audio input/output names and routing for specific audio hardware. \
They can be used with the alsaucm tool. "
HOMEPAGE = "https://alsa-project.org"
BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
SRC_URI[sha256sum] = "374f6833bfd77d0a4675e4aa2bfb79defe850e5a46a5d4542a45962f4b9e272a"
# Something went wrong at upstream tarballing
inherit allarch
do_install() {
install -d "${D}${datadir}/alsa"
cp -r "${S}/ucm" "${D}${datadir}/alsa"
cp -r "${S}/ucm2" "${D}${datadir}/alsa"
}
PACKAGES = "${PN}"
FILES:${PN} = "*"
@@ -0,0 +1,35 @@
From 44636a7c5862538def0d2fac074772cc39a22a15 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Tue, 16 May 2023 02:27:59 +1000
Subject: [PATCH] alsactl: fix compilation when building in a subdir
Fixes: 613372d
Fixes: cff2d1c
Compile errors when building in a subdir:
alsactl/alsactl.c:33:10: fatal error: os_compat.h: No such file or directory
33 | #include "os_compat.h"
| ^~~~~~~~~~~~~
alsactl/lock.c:34:10: fatal error: os_compat.h: No such file or directory
34 | #include "os_compat.h"
| ^~~~~~~~~~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Upstream-Status: Submitted [https://github.com/alsa-project/alsa-utils/pull/213]
---
alsactl/Makefile.am | 2 ++
1 file changed, 2 insertions(+)
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index 80dba69d..fb32c4f3 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -9,6 +9,8 @@ EXTRA_DIST=alsactl.1 alsactl_init.xml
AM_CFLAGS = -D_GNU_SOURCE
+AM_CPPFLAGS = -I$(top_srcdir)/include
+
alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c init_ucm.c \
daemon.c monitor.c clean.c info.c
@@ -0,0 +1,122 @@
SUMMARY = "ALSA sound utilities"
DESCRIPTION = "collection of small and often extremely powerful applications \
designed to allow users to control the various parts of the ALSA system."
HOMEPAGE = "http://www.alsa-project.org"
BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking"
SECTION = "console/utils"
# Some parts are GPL-2.0-or-later, some are GPL-2.0-only (e.g. axfer, alsactl)
# so result is GPL-2.0-only
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
DEPENDS = "alsa-lib ncurses libsamplerate0"
PACKAGECONFIG ??= "udev"
# alsabat can be built also without fftw support (with reduced functionality).
# It would be better to always enable alsabat, but provide an option for
# enabling/disabling fftw. The configure script doesn't support that, however
# (at least in any obvious way), so for now we only support alsabat with fftw
# or no alsabat at all.
PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf"
PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev"
PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2 \
file://0001-alsactl-fix-compilation-when-building-in-a-subdir.patch \
"
SRC_URI[sha256sum] = "e7623d4525595f92e11ce25ee9a97f2040a14c6e4dcd027aa96e06cbce7817bd"
# On build machines with python-docutils (not python3-docutils !!) installed
# rst2man (not rst2man.py) is detected and compile fails with
# | make[1]: *** No rule to make target 'alsaucm.1', needed by 'all-am'. Stop.
# Avoid this by disabling expicitly
EXTRA_OECONF = "--disable-rst2man"
inherit autotools gettext pkgconfig manpages
# This are all packages that we need to make. Also, the now empty alsa-utils
# ipk depends on them.
ALSA_UTILS_PKGS = "\
${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
alsa-utils-alsamixer \
alsa-utils-alsatplg \
alsa-utils-midi \
alsa-utils-aplay \
alsa-utils-amixer \
alsa-utils-aconnect \
alsa-utils-iecset \
alsa-utils-speakertest \
alsa-utils-aseqnet \
alsa-utils-aseqdump \
alsa-utils-alsactl \
alsa-utils-alsaloop \
alsa-utils-alsaucm \
alsa-utils-scripts \
"
PACKAGES += "${ALSA_UTILS_PKGS}"
RDEPENDS:${PN} += "${ALSA_UTILS_PKGS}"
FILES:${PN} = ""
ALLOW_EMPTY:alsa-utils = "1"
FILES:alsa-utils-alsabat = "${bindir}/alsabat"
FILES:alsa-utils-alsatplg = "${bindir}/alsatplg ${libdir}/alsa-topology"
FILES:alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
FILES:alsa-utils-amixer = "${bindir}/amixer"
FILES:alsa-utils-alsamixer = "${bindir}/alsamixer"
FILES:alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
FILES:alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
FILES:alsa-utils-aconnect = "${bindir}/aconnect"
FILES:alsa-utils-aseqnet = "${bindir}/aseqnet"
FILES:alsa-utils-iecset = "${bindir}/iecset"
FILES:alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
FILES:alsa-utils-aseqdump = "${bindir}/aseqdump"
FILES:alsa-utils-alsaloop = "${bindir}/alsaloop"
FILES:alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules"
FILES:alsa-utils-scripts = "${sbindir}/alsaconf \
${sbindir}/alsa-info.sh \
${sbindir}/alsabat-test.sh \
"
SUMMARY:alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver"
SUMMARY:alsa-utils-alsatplg = "Converts topology text files into binary format for kernel"
SUMMARY:alsa-utils-aplay = "Play (and record) sound files using ALSA"
SUMMARY:alsa-utils-amixer = "Command-line control for ALSA mixer and settings"
SUMMARY:alsa-utils-alsamixer = "ncurses-based control for ALSA mixer and settings"
SUMMARY:alsa-utils-speakertest = "ALSA surround speaker test utility"
SUMMARY:alsa-utils-midi = "Miscellaneous MIDI utilities for ALSA"
SUMMARY:alsa-utils-aconnect = "ALSA sequencer connection manager"
SUMMARY:alsa-utils-aseqnet = "Network client/server for ALSA sequencer"
SUMMARY:alsa-utils-iecset = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
SUMMARY:alsa-utils-alsactl = "Saves/restores ALSA-settings in /etc/asound.state"
SUMMARY:alsa-utils-aseqdump = "Shows the events received at an ALSA sequencer port"
SUMMARY:alsa-utils-alsaloop = "ALSA PCM loopback utility"
SUMMARY:alsa-utils-alsaucm = "ALSA Use Case Manager"
SUMMARY:alsa-utils-scripts = "Shell scripts that show help info and create ALSA configuration files"
RRECOMMENDS:alsa-utils-alsactl = "alsa-states"
do_install() {
autotools_do_install
install -d ${D}${sbindir}
install -m 0755 ${B}/alsaconf/alsaconf ${D}${sbindir}/
install -m 0755 ${S}/alsa-info/alsa-info.sh ${D}${sbindir}/
if ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'true', 'false', d)}; then
install -m 0755 ${S}/bat/alsabat-test.sh ${D}${sbindir}/
fi
# If udev is disabled, we told configure to install the rules
# in /unwanted, so we can remove them now. If udev is enabled,
# then /unwanted won't exist and this will have no effect.
rm -rf ${D}/unwanted
}
PROVIDES = "alsa-utils-alsaconf alsa-utils-scripts"
RDEPENDS:${PN}-scripts += "bash"
@@ -0,0 +1,35 @@
From 85eefb65eb632d827e17a72518dd289dcd721084 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 2 Jul 2023 19:29:55 -0700
Subject: [PATCH] libswscale/riscv: Fix syntax of vsetvli
Add missing operand which clang complains about but gcc assumes it to be
'm1' if not specifiied.
Fixes building with clang
| src/libswscale/riscv/rgb2rgb_rvv.S:88:25: error: operand must be e[8|16|32|64|128|256|512|1024],m[1|2|4|8|f2|f4|f8],[ta|tu],[ma|mu]
| vsetvli t4, t3, e8, ta, ma
| ^
Upstream-Status: Submitted [https://ffmpeg.org/pipermail/ffmpeg-devel/2023-July/311514.html]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libswscale/riscv/rgb2rgb_rvv.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libswscale/riscv/rgb2rgb_rvv.S b/libswscale/riscv/rgb2rgb_rvv.S
index 5626d90..bbdfdbe 100644
--- a/libswscale/riscv/rgb2rgb_rvv.S
+++ b/libswscale/riscv/rgb2rgb_rvv.S
@@ -85,7 +85,7 @@ func ff_interleave_bytes_rvv, zve32x
mv t3, a3
addi a4, a4, -1
2:
- vsetvli t4, t3, e8, ta, ma
+ vsetvli t4, t3, e8, m1, ta, ma
sub t3, t3, t4
vle8.v v8, (t0)
add t0, t4, t0
--
2.41.0
@@ -0,0 +1,177 @@
SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
mux, demux, stream, filter and play pretty much anything that humans and machines \
have created. It supports the most obscure ancient formats up to the cutting edge."
HOMEPAGE = "https://www.ffmpeg.org/"
SECTION = "libs"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG"
LICENSE:${PN} = "GPL-2.0-or-later"
LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libpostproc = "GPL-2.0-or-later"
LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
file://0001-libswscale-riscv-Fix-syntax-of-vsetvli.patch"
SRC_URI[sha256sum] = "57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082"
# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
ARM_INSTRUCTION_SET:armv4 = "arm"
ARM_INSTRUCTION_SET:armv5 = "arm"
ARM_INSTRUCTION_SET:armv6 = "arm"
# Should be API compatible with libav (which was a fork of ffmpeg)
# libpostproc was previously packaged from a separate recipe
PROVIDES = "libav libpostproc"
DEPENDS = "nasm-native"
inherit autotools pkgconfig
PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
alsa bzlib lzma theora zlib \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}"
# libraries to build in addition to avutil
PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
# features to support
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
PACKAGECONFIG[altivec] = "--enable-altivec,--disable-altivec,"
PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac"
PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus"
PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk"
PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2"
PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
PACKAGECONFIG[srt] = "--enable-libsrt,--disable-libsrt,srt"
PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg"
PACKAGECONFIG[v4l2] = "--enable-libv4l2,--disable-libv4l2,v4l-utils"
PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265"
PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb"
PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
# Check codecs that require --enable-nonfree
USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}"
def cpu(d):
for arg in (d.getVar('TUNE_CCARGS') or '').split():
if arg.startswith('-mcpu='):
return arg[6:]
return 'generic'
EXTRA_OECONF = " \
--disable-stripping \
--enable-pic \
--enable-shared \
--enable-pthreads \
${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
\
--cross-prefix=${TARGET_PREFIX} \
\
--ld='${CCLD}' \
--cc='${CC}' \
--cxx='${CXX}' \
--arch=${TARGET_ARCH} \
--target-os='linux' \
--enable-cross-compile \
--extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
--extra-ldflags='${LDFLAGS}' \
--sysroot='${STAGING_DIR_TARGET}' \
${EXTRA_FFCONF} \
--libdir=${libdir} \
--shlibdir=${libdir} \
--datadir=${datadir}/ffmpeg \
${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp --disable-mipsdspr2', d)} \
--cpu=${@cpu(d)} \
--pkg-config=pkg-config \
"
EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \
--disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa"
EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic --disable-rvv --disable-asm"
EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic"
EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic"
# gold crashes on x86, another solution is to --disable-asm but thats more hacky
# ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684
LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
EXTRA_OEMAKE = "V=1"
do_configure() {
export TMPDIR="${B}/tmp"
mkdir -p ${B}/tmp
${S}/configure ${EXTRA_OECONF}
sed -i -e "s,^X86ASMFLAGS=.*,& --debug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} --debug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR},g" ${B}/ffbuild/config.mak
}
# patch out build host paths for reproducibility
do_compile:prepend:class-target() {
sed -i -e "s,${WORKDIR},,g" ${B}/config.h
}
PACKAGES =+ "libavcodec \
libavdevice \
libavfilter \
libavformat \
libavutil \
libpostproc \
libswresample \
libswscale"
FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}"
FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}"
FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}"
FILES:libavformat = "${libdir}/libavformat${SOLIBS}"
FILES:libavutil = "${libdir}/libavutil${SOLIBS}"
FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}"
FILES:libswresample = "${libdir}/libswresample${SOLIBS}"
FILES:libswscale = "${libdir}/libswscale${SOLIBS}"
# ffmpeg disables PIC on some platforms (e.g. x86-32)
INSANE_SKIP:${MLPREFIX}libavcodec = "textrel"
INSANE_SKIP:${MLPREFIX}libavdevice = "textrel"
INSANE_SKIP:${MLPREFIX}libavfilter = "textrel"
INSANE_SKIP:${MLPREFIX}libavformat = "textrel"
INSANE_SKIP:${MLPREFIX}libavutil = "textrel"
INSANE_SKIP:${MLPREFIX}libswscale = "textrel"
INSANE_SKIP:${MLPREFIX}libswresample = "textrel"
INSANE_SKIP:${MLPREFIX}libpostproc = "textrel"
@@ -0,0 +1,36 @@
SUMMARY = "Free Lossless Audio Codec"
DESCRIPTION = "FLAC stands for Free Lossless Audio Codec, a lossless audio compression format."
HOMEPAGE = "https://xiph.org/flac/"
BUGTRACKER = "https://github.com/xiph/flac/issues"
SECTION = "libs"
LICENSE = "GFDL-1.2 & GPL-2.0-or-later & LGPL-2.1-or-later & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
file://src/Makefile.am;beginline=1;endline=17;md5=b1dab2704be7f01bfbd9b7f6d5f000a9 \
file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://src/flac/main.c;beginline=1;endline=18;md5=23099119c034d894bd1bf7ef5bd22101 \
file://COPYING.LGPL;md5=fbc093901857fcd118f065f900982c24 \
file://COPYING.Xiph;md5=0c90e41ab2fa7e69ca9391330d870221 \
file://include/FLAC/all.h;beginline=65;endline=70;md5=39aaf5e03c7364363884c8b8ddda8eea"
SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz"
SRC_URI[sha256sum] = "6c58e69cd22348f441b861092b825e591d0b822e106de6eb0ee4d05d27205b70"
CVE_PRODUCT = "libflac flac"
inherit autotools gettext
EXTRA_OECONF = "--disable-oggtest \
--without-libiconv-prefix \
ac_cv_prog_NASM="" \
"
PACKAGECONFIG ??= " \
ogg \
"
PACKAGECONFIG[avx] = "--enable-avx,--disable-avx"
PACKAGECONFIG[ogg] = "--enable-ogg --with-ogg-libraries=${STAGING_LIBDIR} --with-ogg-includes=${STAGING_INCDIR},--disable-ogg,libogg"
PACKAGES += "libflac libflac++"
FILES:${PN} = "${bindir}/*"
FILES:libflac = "${libdir}/libFLAC.so.*"
FILES:libflac++ = "${libdir}/libFLAC++.so.*"
@@ -0,0 +1,38 @@
From 73b1002eda17451db1f58431b42c25203f1d3097 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 9 Sep 2018 17:38:10 -0700
Subject: [PATCH] connect has a different signature on musl
On linux when not using glibc and using musl for C library, connect
API has a different signature, this patch fixes this so it can compile
on musl, the functionality should remain same as it is immediately
typcasted to struct sockaddr_in* type inside the function before use
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
validate/plugins/fault_injection/socket_interposer.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/validate/plugins/fault_injection/socket_interposer.c b/validate/plugins/fault_injection/socket_interposer.c
index 53c1ebb..ad7adf8 100644
--- a/validate/plugins/fault_injection/socket_interposer.c
+++ b/validate/plugins/fault_injection/socket_interposer.c
@@ -100,10 +100,15 @@ socket_interposer_set_callback (struct sockaddr_in *addrin,
}
int
-connect (int socket, const struct sockaddr_in *addrin, socklen_t address_len)
+#if defined(__linux__) && !defined(__GLIBC__)
+connect (int socket, const struct sockaddr *addr, socklen_t address_len)
+#else
+connect (int socket, const struct sockaddr_in *addr, socklen_t address_len)
+#endif
{
size_t i;
int override_errno = 0;
+ struct sockaddr_in* addrin = (struct sockaddr_in*)addr;
typedef ssize_t (*real_connect_fn) (int, const struct sockaddr_in *,
socklen_t);
static real_connect_fn real_connect = 0;
@@ -0,0 +1,52 @@
SUMMARY = "Gstreamer validation tool"
DESCRIPTION = "A Tool to test GStreamer components"
HOMEPAGE = "https://gstreamer.freedesktop.org/documentation/gst-devtools/index.html"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://validate/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
#S = "${WORKDIR}/gst-devtools-${PV}"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-devtools/gst-devtools-${PV}.tar.xz \
file://0001-connect-has-a-different-signature-on-musl.patch \
"
SRC_URI[sha256sum] = "4c52053ce8c1df72fd81721e9f53de3b146edcf2de28f607be705bce4cf909d1"
DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base"
RRECOMMENDS:${PN} = "git"
FILES:${PN} += "${datadir}/gstreamer-1.0/* ${libdir}/gst-validate-launcher/* ${libdir}/gstreamer-1.0/*"
inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection
# TODO: put this in a gettext.bbclass patch
def gettext_oemeson(d):
if d.getVar('USE_NLS') == 'no':
return '-Dnls=disabled'
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return '-Dnls=disabled'
return '-Dnls=enabled'
# Build GstValidateVideo
PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Ddebug_viewer=disabled \
-Dtests=disabled \
-Dvalidate=enabled \
${@gettext_oemeson(d)} \
"
do_install:append () {
for fn in ${bindir}/gst-validate-launcher \
${libdir}/gst-validate-launcher/python/launcher/config.py; do
sed -i -e 's,${B},/usr/src/debug/${PN},g' -e 's,${S},/usr/src/debug/${PN},g' ${D}$fn
done
}
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
@@ -0,0 +1,37 @@
From 7924016fce2d0b435891a335cdae52fc939c7e3b Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Thu, 17 Aug 2017 11:07:02 +0300
Subject: [PATCH] Make player examples installable
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Upstream-Status: Denied [Upstream considers these code examples, for now a least]
https://bugzilla.gnome.org/show_bug.cgi?id=777827
---
playback/player/gst-play/meson.build | 1 +
playback/player/gtk/meson.build | 1 +
2 files changed, 2 insertions(+)
diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build
index 8ec021d..977cc5c 100644
--- a/playback/player/gst-play/meson.build
+++ b/playback/player/gst-play/meson.build
@@ -2,5 +2,6 @@ executable('gst-play',
['gst-play.c',
'gst-play-kb.c',
'gst-play-kb.h'],
+ install: true,
dependencies : [gst_dep, gstplayer_dep, m_dep])
diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build
index f7a7419..6281130 100644
--- a/playback/player/gtk/meson.build
+++ b/playback/player/gtk/meson.build
@@ -13,5 +13,6 @@ if gtk_dep.found()
gtk_play_resources,
'gtk-video-renderer.h',
'gtk-video-renderer.c'],
+ install: true,
dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep])
endif
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Media Player
Comment=Basic media player
Icon=video-player
TryExec=gtk-play
Exec=gtk-play
StartupNotify=true
Terminal=false
Type=Application
Categories=GTK;AudioVideo;
@@ -0,0 +1,35 @@
SUMMARY = "GStreamer examples (including gtk-play, gst-play)"
DESCRIPTION = "GStreamer example applications"
HOMEPAGE = "https://gitlab.freedesktop.org/gstreamer/gst-examples"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues"
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 libsoup-2.4 json-glib glib-2.0-native"
SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https;branch=1.18 \
file://0001-Make-player-examples-installable.patch \
file://gst-player.desktop \
"
SRCREV = "70e4fcf4fc8ae19641aa990de5f37d758cdfcea4"
S = "${WORKDIR}/git"
inherit meson pkgconfig features_check
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
do_install:append() {
install -m 0644 -D ${WORKDIR}/gst-player.desktop ${D}${datadir}/applications/gst-player.desktop
}
RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback"
RRECOMMENDS:${PN} = "gstreamer1.0-plugins-base-meta \
gstreamer1.0-plugins-good-meta \
gstreamer1.0-plugins-bad-meta \
${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-libav", "", d)} \
${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "gstreamer1.0-plugins-ugly-meta", "", d)}"
RPROVIDES:${PN} += "gst-player gst-player-bin"
@@ -0,0 +1,28 @@
SUMMARY = "Libav-based GStreamer 1.x plugin"
DESCRIPTION = "Contains a GStreamer plugin for using the encoders, decoders, \
muxers, and demuxers provided by FFmpeg."
HOMEPAGE = "http://gstreamer.freedesktop.org/"
SECTION = "multimedia"
# ffmpeg has comercial license flags so add it as we need ffmpeg as a dependency
LICENSE_FLAGS = "commercial"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz"
SRC_URI[sha256sum] = "9a751bc740de768e791c37a95f0a924c6a41d12fd7f37f54ce6a4e834be122d3"
S = "${WORKDIR}/gst-libav-${PV}"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg"
inherit meson pkgconfig upstream-version-is-even
EXTRA_OEMESON += " \
-Dtests=disabled \
"
FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
@@ -0,0 +1,67 @@
SUMMARY = "Gstreamer1.0 package groups"
LICENSE = "MIT"
# Due to use of COMBINED_FEATURES
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
DEPENDS_UGLY="${@'gstreamer1.0-plugins-ugly' if 'ugly' in COMMERCIAL_PLUGINS.split('-') else ''}"
DEPENDS_BAD="${@'gstreamer1.0-plugins-bad' if 'bad' in COMMERCIAL_PLUGINS.split('-') else ''}"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good ${DEPENDS_UGLY} ${DEPENDS_BAD}"
PACKAGES = "\
gstreamer1.0-meta-base \
gstreamer1.0-meta-x11-base \
gstreamer1.0-meta-audio \
gstreamer1.0-meta-debug \
gstreamer1.0-meta-video"
ALLOW_EMPTY:gstreamer1.0-meta-base = "1"
ALLOW_EMPTY:gstreamer1.0-meta-x11-base = "1"
ALLOW_EMPTY:gstreamer1.0-meta-audio = "1"
ALLOW_EMPTY:gstreamer1.0-meta-debug = "1"
ALLOW_EMPTY:gstreamer1.0-meta-video = "1"
RDEPENDS:gstreamer1.0-meta-base = "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gstreamer1.0-meta-x11-base', '', d)} \
gstreamer1.0 \
gstreamer1.0-plugins-base-playback \
gstreamer1.0-plugins-base-gio \
${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \
gstreamer1.0-plugins-base-volume \
gstreamer1.0-plugins-base-audioconvert \
gstreamer1.0-plugins-base-audioresample \
gstreamer1.0-plugins-base-typefindfunctions \
gstreamer1.0-plugins-base-videoconvertscale \
gstreamer1.0-plugins-good-autodetect \
gstreamer1.0-plugins-good-soup"
RRECOMMENDS:gstreamer1.0-meta-x11-base = "\
gstreamer1.0-plugins-base-ximagesink \
gstreamer1.0-plugins-base-xvimagesink"
RDEPENDS:gstreamer1.0-meta-audio = "\
gstreamer1.0-meta-base \
gstreamer1.0-plugins-base-vorbis \
gstreamer1.0-plugins-base-ogg \
gstreamer1.0-plugins-good-wavparse \
gstreamer1.0-plugins-good-flac \
${COMMERCIAL_AUDIO_PLUGINS}"
RDEPENDS:gstreamer1.0-meta-debug = "\
gstreamer1.0-meta-base \
gstreamer1.0-plugins-good-debug \
gstreamer1.0-plugins-base-audiotestsrc \
gstreamer1.0-plugins-base-videotestsrc"
RDEPENDS:gstreamer1.0-meta-video = "\
gstreamer1.0-meta-base \
gstreamer1.0-plugins-good-avi \
gstreamer1.0-plugins-good-matroska \
gstreamer1.0-plugins-base-theora \
${COMMERCIAL_VIDEO_PLUGINS}"
RRECOMMENDS:gstreamer1.0-meta-video = "\
gstreamer1.0-meta-audio"
@@ -0,0 +1,47 @@
SUMMARY = "OpenMAX IL plugins for GStreamer"
DESCRIPTION = "Wraps available OpenMAX IL components and makes them available as standard GStreamer elements."
HOMEPAGE = "http://gstreamer.freedesktop.org/"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz"
SRC_URI[sha256sum] = "5fcb872d977b035fb75a2d0ea955ba052dc3bdae282f8f60aa9d865808784211"
S = "${WORKDIR}/gst-omx-${PV}"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad virtual/libomxil"
inherit meson pkgconfig upstream-version-is-even
GSTREAMER_1_0_OMX_TARGET ?= "bellagio"
GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0"
EXTRA_OEMESON += "-Dtarget=${GSTREAMER_1_0_OMX_TARGET}"
python __anonymous () {
omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET")
if omx_target in ['generic', 'bellagio']:
# Bellagio headers are incomplete (they are missing the OMX_VERSION_MAJOR,#
# OMX_VERSION_MINOR, OMX_VERSION_REVISION, and OMX_VERSION_STEP macros);
# appending a directory path to gst-omx' internal OpenMAX IL headers fixes this
d.appendVar("CFLAGS", " -I${S}/omx/openmax")
elif omx_target == "rpi":
# Dedicated Raspberry Pi OpenMAX IL support makes this package machine specific
d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH"))
}
set_omx_core_name() {
sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
}
do_install[postfuncs] += " set_omx_core_name "
FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
VIRTUAL-RUNTIME_libomxil ?= "libomxil"
RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_libomxil}"
@@ -0,0 +1,26 @@
From 6c3eeaf6435608f744303c17d52245f926cd28ac Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 26 Jan 2016 15:16:01 -0800
Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
index 2c60ced..e8226d8 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
GstVC1SeqLayer * seqlayer)
{
guint32 tmp;
- guint8 tmp8;
+ guint8 tmp8 = 0;
guint8 structA[8] = { 0, };
guint8 structB[12] = { 0, };
GstBitReader br;
@@ -0,0 +1,28 @@
From 701255c5797f222f0c47ace6437d213607b98d1e Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 3 Feb 2016 18:05:41 -0800
Subject: [PATCH] avoid including <sys/poll.h> directly
musl libc generates warnings if <sys/poll.h> is included directly.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
sys/dvb/gstdvbsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index 92c918c..5e27871 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -98,7 +98,7 @@
#include <gst/gst.h>
#include <gst/glib-compat-private.h>
#include <sys/ioctl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
@@ -0,0 +1,33 @@
From 3bc5d48257032b6bbee532aad15062fbbcc43bfe Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Mon, 27 Jan 2020 10:22:35 +0000
Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
When Yocto build is performed, opencv searches for data dir using simple
'test' command, this fails because pkg-config provides an absolute
path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
in order for the 'test' utility to pick up the absolute path.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
ext/opencv/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
index 1d86b90..b5c8b95 100644
--- a/ext/opencv/meson.build
+++ b/ext/opencv/meson.build
@@ -87,6 +87,9 @@ if opencv_found
opencv_prefix = opencv_dep.get_variable('prefix')
gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
+ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
+ opencv_prefix = pkgconf_sysroot + opencv_prefix
+
# Check the data dir used by opencv for its xml data files
# Use prefix from pkg-config to be compatible with cross-compilation
r = run_command('test', '-d', opencv_prefix + '/share/opencv', check: false)
@@ -0,0 +1,165 @@
require gstreamer1.0-plugins-common.inc
require gstreamer1.0-plugins-license.inc
SUMMARY = "'Bad' GStreamer plugins and helper libraries "
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
file://0002-avoid-including-sys-poll.h-directly.patch \
file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
"
SRC_URI[sha256sum] = "eaaf53224565eaabd505ca39c6d5769719b45795cf532ce1ceb60e1b2ebe99ac"
S = "${WORKDIR}/gst-plugins-bad-${PV}"
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS += "gstreamer1.0-plugins-base"
inherit gobject-introspection
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
sndfile ttml uvch264 webp \
${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \
"
PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom"
PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass"
PACKAGECONFIG[avtp] = "-Davtp=enabled,-Davtp=disabled,libavtp"
PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl"
PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2"
PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl"
PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac"
PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
PACKAGECONFIG[hls] = "-Dhls=enabled,-Dhls=disabled,"
# Pick atleast one crypto backend below when enabling hls
PACKAGECONFIG[nettle] = "-Dhls-crypto=nettle,,nettle"
PACKAGECONFIG[openssl] = "-Dhls-crypto=openssl,,openssl"
PACKAGECONFIG[gcrypt] = "-Dhls-crypto=libgcrypt,,libgcrypt"
# the gl packageconfig enables OpenGL elements that haven't been ported
# to -base yet. They depend on the gstgl library in -base, so we do
# not add GL dependencies here, since these are taken care of in -base.
PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled,"
PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm"
PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
PACKAGECONFIG[msdk] = "-Dmsdk=enabled -Dmfx_api=oneVPL,-Dmsdk=disabled,onevpl-intel-gpu"
PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon"
PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv"
PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
# the opus encoder/decoder elements are now in the -base package,
# but the opus parser remains in -bad
PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus"
PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc"
PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled"
PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
PACKAGECONFIG[srt] = "-Dsrt=enabled,-Dsrt=disabled,srt"
PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of
# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs
PACKAGECONFIG[v4l2codecs] = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev"
PACKAGECONFIG[va] = "-Dva=enabled,-Dva=disabled,libva"
PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native"
PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon"
PACKAGECONFIG[x265] = "-Dx265=enabled,-Dx265=disabled,x265"
GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Daes=enabled \
-Dcodecalpha=enabled \
-Ddecklink=enabled \
-Ddvb=enabled \
-Dfbdev=enabled \
-Dipcpipeline=enabled \
-Dshm=enabled \
-Dtranscode=enabled \
-Dandroidmedia=disabled \
-Dapplemedia=disabled \
-Dasio=disabled \
-Dbs2b=disabled \
-Dchromaprint=disabled \
-Dd3dvideosink=disabled \
-Dd3d11=disabled \
-Ddirectsound=disabled \
-Ddts=disabled \
-Dfdkaac=disabled \
-Dflite=disabled \
-Dgme=disabled \
-Dgs=disabled \
-Dgsm=disabled \
-Diqa=disabled \
-Dkate=disabled \
-Dladspa=disabled \
-Dldac=disabled \
-Dlv2=disabled \
-Dmagicleap=disabled \
-Dmediafoundation=disabled \
-Dmicrodns=disabled \
-Dmpeg2enc=disabled \
-Dmplex=disabled \
-Dmusepack=disabled \
-Dnvcodec=disabled \
-Dopenexr=disabled \
-Dopenni2=disabled \
-Dopenaptx=disabled \
-Dopensles=disabled \
-Donnx=disabled \
-Dqroverlay=disabled \
-Dsoundtouch=disabled \
-Dspandsp=disabled \
-Dsvthevcenc=disabled \
-Dteletext=disabled \
-Dwasapi=disabled \
-Dwasapi2=disabled \
-Dwildmidi=disabled \
-Dwinks=disabled \
-Dwinscreencap=disabled \
-Dwpe=disabled \
-Dzxing=disabled \
"
export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
ARM_INSTRUCTION_SET:armv4 = "arm"
ARM_INSTRUCTION_SET:armv5 = "arm"
FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
@@ -0,0 +1,44 @@
From f9d48cd85ee68207733b1b91a00453462c33524a Mon Sep 17 00:00:00 2001
From: zhouming <b42586@freescale.com>
Date: Wed, 14 May 2014 10:16:20 +0800
Subject: [PATCH 1/4] ENGR00312515: get caps from src pad when query caps
https://bugzilla.gnome.org/show_bug.cgi?id=728312
Upstream-Status: Pending
Signed-off-by: zhouming <b42586@freescale.com>
---
gst-libs/gst/tag/gsttagdemux.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
mode change 100644 => 100755 gst-libs/gst/tag/gsttagdemux.c
diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c
old mode 100644
new mode 100755
index f545857..62d10ef
--- a/gst-libs/gst/tag/gsttagdemux.c
+++ b/gst-libs/gst/tag/gsttagdemux.c
@@ -1777,6 +1777,19 @@ gst_tag_demux_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
}
break;
}
+ case GST_QUERY_CAPS:
+ {
+
+ /* We can hijack caps query if we typefind already */
+ if (demux->priv->src_caps) {
+ gst_query_set_caps_result (query, demux->priv->src_caps);
+ res = TRUE;
+ } else {
+ res = gst_pad_query_default (pad, parent, query);
+ }
+ break;
+ }
+
default:
res = gst_pad_query_default (pad, parent, query);
break;
--
2.28.0
@@ -0,0 +1,229 @@
From f587861bbe12ad0b10370f835592746aafedbf56 Mon Sep 17 00:00:00 2001
From: Mingke Wang <mingke.wang@freescale.com>
Date: Thu, 19 Mar 2015 14:17:10 +0800
Subject: [PATCH 2/4] ssaparse: enhance SSA text lines parsing.
some parser will pass in the original ssa text line which starts with "Dialog:"
and there's are maybe multiple Dialog lines in one input buffer.
Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747496]
Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
---
gst/subparse/gstssaparse.c | 150 +++++++++++++++++++++++++++++++++----
1 file changed, 134 insertions(+), 16 deletions(-)
mode change 100644 => 100755 gst/subparse/gstssaparse.c
diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c
old mode 100644
new mode 100755
index c849c08..4b9636c
--- a/gst/subparse/gstssaparse.c
+++ b/gst/subparse/gstssaparse.c
@@ -262,6 +262,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* gst_ssa_parse_push_line:
* @parse: caller element
* @txt: text to push
+ * @size: text size need to be parse
* @start: timestamp for the buffer
* @duration: duration for the buffer
*
@@ -271,27 +272,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
* Returns: result of the push of the created buffer
*/
static GstFlowReturn
-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
+gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size,
GstClockTime start, GstClockTime duration)
{
GstFlowReturn ret;
GstBuffer *buf;
- gchar *t, *escaped;
+ gchar *t, *text, *p, *escaped, *p_start, *p_end;
gint num, i, len;
+ GstClockTime start_time = G_MAXUINT64, end_time = 0;
- num = atoi (txt);
- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
- num, GST_TIME_ARGS (start));
-
- /* skip all non-text fields before the actual text */
+ p = text = g_malloc(size + 1);
+ *p = '\0';
t = txt;
- for (i = 0; i < 8; ++i) {
- t = strchr (t, ',');
+
+ /* there are may have multiple dialogue lines at a time */
+ while (*t) {
+ /* ignore leading white space characters */
+ while (isspace(*t))
+ t++;
+
+ /* ignore Format: and Style: lines */
+ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) {
+ while (*t != '\0' && *t != '\n') {
+ t++;
+ }
+ }
+
+ if (*t == '\0')
+ break;
+
+ /* continue with next line */
+ if (*t == '\n') {
+ t++;
+ continue;
+ }
+
+ if(strncmp(t, "Dialogue:", 9) != 0) {
+ /* not started with "Dialogue:", it must be a line trimmed by demuxer */
+ num = atoi (t);
+ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT,
+ num, GST_TIME_ARGS (start));
+
+ /* skip all non-text fields before the actual text */
+ for (i = 0; i < 8; ++i) {
+ t = strchr (t, ',');
+ if (t == NULL)
+ break;
+ ++t;
+ }
+ } else {
+ /* started with "Dialogue:", update timestamp and duration */
+ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */
+ guint hour, min, sec, msec, len;
+ GstClockTime tmp;
+ gchar t_str[12] = {0};
+
+ /* find the first ',' */
+ p_start = strchr (t, ',');
+ if (p_start)
+ p_end = strchr (++p_start, ',');
+
+ if (p_start && p_end) {
+ /* copy text between first ',' and second ',' */
+ strncpy(t_str, p_start, p_end - p_start);
+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
+ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND;
+ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n",
+ hour, min, sec, msec);
+ if (start_time > tmp)
+ start_time = tmp;
+ } else {
+ GST_WARNING_OBJECT (parse,
+ "failed to parse ssa start timestamp string :%s", t_str);
+ }
+
+ p_start = p_end;
+ p_end = strchr (++p_start, ',');
+ if (p_end) {
+ /* copy text between second ',' and third ',' */
+ strncpy(t_str, p_start, p_end - p_start);
+ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) {
+ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND;
+ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n",
+ hour, min, sec, msec);
+ if (end_time < tmp)
+ end_time = tmp;
+ } else {
+ GST_WARNING_OBJECT (parse,
+ "failed to parse ssa end timestamp string :%s", t_str);
+ }
+ }
+ }
+
+ /* now skip all non-text fields before the actual text */
+ for (i = 0; i <= 8; ++i) {
+ t = strchr (t, ',');
+ if (t == NULL)
+ break;
+ ++t;
+ }
+ }
+
+ /* line end before expected number of ',', not a Dialogue line */
if (t == NULL)
- return GST_FLOW_ERROR;
- ++t;
+ break;
+
+ /* if not the first line, and the last character of previous line is '\0',
+ * then replace it with '\N' */
+ if (p != text && *p == '\0') {
+ *p++ = '\\';
+ *p++ = 'N';
+ }
+
+ /* copy all actual text of this line */
+ while ((*t != '\0') && (*t != '\n'))
+ *p++ = *t++;
+
+ /* add a terminator at the end */
+ *p = '\0';
+ }
+
+ /* not valid text found in this buffer return OK to let caller unref buffer */
+ if (strlen(text) <= 0) {
+ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n");
+ return GST_FLOW_ERROR;
}
+ t = text;
GST_LOG_OBJECT (parse, "Text : %s", t);
if (gst_ssa_parse_remove_override_codes (parse, t)) {
@@ -309,13 +416,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
gst_buffer_fill (buf, 0, escaped, len + 1);
gst_buffer_set_size (buf, len);
g_free (escaped);
+ g_free(t);
+
+ if (start_time != G_MAXUINT64)
+ GST_BUFFER_TIMESTAMP (buf) = start_time;
+ else
+ GST_BUFFER_TIMESTAMP (buf) = start;
- GST_BUFFER_TIMESTAMP (buf) = start;
- GST_BUFFER_DURATION (buf) = duration;
+ if (end_time > start_time)
+ GST_BUFFER_DURATION (buf) = end_time - start_time;
+ else
+ GST_BUFFER_DURATION (buf) = duration;
GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT
- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start),
- GST_TIME_ARGS (duration));
+ " and duration %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
+ GST_TIME_ARGS (GST_BUFFER_DURATION (buf)));
ret = gst_pad_push (parse->srcpad, buf);
@@ -335,6 +451,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
GstClockTime ts;
gchar *txt;
GstMapInfo map;
+ gint size;
if (G_UNLIKELY (!parse->framed))
goto not_framed;
@@ -352,13 +469,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
/* make double-sure it's 0-terminated and all */
gst_buffer_map (buf, &map, GST_MAP_READ);
txt = g_strndup ((gchar *) map.data, map.size);
+ size = map.size;
gst_buffer_unmap (buf, &map);
if (txt == NULL)
goto empty_text;
ts = GST_BUFFER_TIMESTAMP (buf);
- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf));
+ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf));
if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) {
GstSegment segment;
--
2.28.0
@@ -0,0 +1,32 @@
From 153f3b83a3fed77785bd1420bed8bbafa2d791b3 Mon Sep 17 00:00:00 2001
From: Carlos Rafael Giani <crg7475@mailbox.org>
Date: Tue, 21 May 2019 14:01:11 +0200
Subject: [PATCH 3/4] viv-fb: Make sure config.h is included
This prevents build errors due to missing GST_API_* symbols
Upstream-Status: Pending
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
---
gst-libs/gst/gl/gl-prelude.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h
index 05e1f62..96ce5e6 100644
--- a/gst-libs/gst/gl/gl-prelude.h
+++ b/gst-libs/gst/gl/gl-prelude.h
@@ -22,6 +22,10 @@
#ifndef __GST_GL_PRELUDE_H__
#define __GST_GL_PRELUDE_H__
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <gst/gst.h>
#ifdef BUILDING_GST_GL
--
2.28.0
@@ -0,0 +1,96 @@
require gstreamer1.0-plugins-common.inc
SUMMARY = "'Base' GStreamer plugins and helper libraries"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
file://0003-viv-fb-Make-sure-config.h-is-included.patch \
file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
"
SRC_URI[sha256sum] = "292424e82dea170528c42b456f62a89532bcabc0508f192e34672fb86f68e5b8"
S = "${WORKDIR}/gst-plugins-base-${PV}"
DEPENDS += "iso-codes util-linux zlib"
inherit gobject-introspection
# opengl packageconfig factored out to make it easy for distros
# and BSP layers to choose OpenGL APIs/platforms/window systems
PACKAGECONFIG_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl glx', '', d)}"
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl ${PACKAGECONFIG_X11}', '', d)}"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${PACKAGECONFIG_GL} \
${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
jpeg ogg pango png theora vorbis \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
"
OPENGL_APIS = 'opengl gles2'
OPENGL_PLATFORMS = 'egl glx'
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene"
PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
# This enables Qt5 QML examples in -base. The Qt5 GStreamer
# qmlglsink and qmlglsrc plugins still exist in -good.
PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native"
PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
# OpenGL API packageconfigs
PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
PACKAGECONFIG[gles2] = ",,virtual/libgles2"
# OpenGL platform packageconfigs
PACKAGECONFIG[egl] = ",,virtual/egl"
PACKAGECONFIG[glx] = ",,virtual/libgl"
# OpenGL window systems (except for X11)
PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
def get_opengl_cmdline_list(switch_name, options, d):
selected_options = []
if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
for option in options.split():
if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
selected_options += [option]
if selected_options:
return '-D' + switch_name + '=' + ','.join(selected_options)
else:
return ''
CVE_PRODUCT += "gst-plugins-base"
@@ -0,0 +1,47 @@
# This .inc file contains the common setup for the gstreamer1.0-plugins-*
# plugin set recipes.
# SUMMARY is set in the actual .bb recipes
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
SECTION = "multimedia"
DEPENDS = "gstreamer1.0 glib-2.0-native"
inherit gettext meson pkgconfig upstream-version-is-even
require gstreamer1.0-plugins-packaging.inc
# Orc enables runtime JIT compilation of data processing routines from Orc
# bytecode to SIMD instructions for various architectures (currently SSE, MMX,
# MIPS, Altivec and NEON are supported).
# This value is used in the PACKAGECONFIG values for each plugin set recipe.
# By modifying it, Orc can be enabled/disabled in all of these recipes at once.
GSTREAMER_ORC ?= "orc"
# workaround to disable orc on mips to fix the build failure
# {standard input}: Assembler messages:
# {standard input}:46587: Error: branch out of range
GSTREAMER_ORC:mips = ""
PACKAGECONFIG[orc] = "-Dorc=enabled,-Dorc=disabled,orc orc-native"
# TODO: put this in a gettext.bbclass patch (with variables to allow for
# configuring the option name and the enabled/disabled values).
def gettext_oemeson(d):
if d.getVar('USE_NLS') == 'no':
return '-Dnls=disabled'
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return '-Dnls=disabled'
return '-Dnls=enabled'
# Not all plugin sets contain examples, so the -Dexamples
# option needs to be added conditionally.
GST_PLUGIN_SET_HAS_EXAMPLES ?= "1"
EXTRA_OEMESON += " \
${@bb.utils.contains('GST_PLUGIN_SET_HAS_EXAMPLES', '1', '-Dexamples=disabled', '', d)} \
${@gettext_oemeson(d)} \
"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
@@ -0,0 +1,56 @@
From bf8b2fa0f6870589d036f0f33c140a3f85b530a0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 31 Mar 2020 21:23:28 -0700
Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h
gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to
prefer qt headers definitions for GLsync
This helps in fixing build errors like below
/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync'
24 | typedef struct __GLsync *GLsync;
| ^~~~~~
In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84,
from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30:
/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync
'
40 | typedef gpointer GLsync;
| ^~~~~~
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
ext/qt/gstqsgtexture.cc | 2 +-
ext/qt/qtwindow.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
index a05d26e..4cc9fc6 100644
--- a/ext/qt/gstqsgtexture.cc
+++ b/ext/qt/gstqsgtexture.cc
@@ -27,7 +27,7 @@
#include <gst/video/video.h>
#include <gst/gl/gl.h>
-#include <gst/gl/gstglfuncs.h>
+#include <ext/qt/gstqtgl.h>
#include "gstqsgtexture.h"
#define GST_CAT_DEFAULT gst_qsg_texture_debug
diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
index 9360c33..0dfd3f1 100644
--- a/ext/qt/qtwindow.cc
+++ b/ext/qt/qtwindow.cc
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <gst/video/video.h>
-#include <gst/gl/gstglfuncs.h>
+#include <ext/qt/gstqtgl.h>
#include "qtwindow.h"
#include "gstqsgtexture.h"
#include "gstqtglutility.h"
--
2.28.0
@@ -0,0 +1,40 @@
From 5ce1e410965ed047a03c09b17796162f0363e396 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 13 Feb 2023 12:47:31 -0800
Subject: [PATCH] v4l2: Define ioctl_req_t for posix/linux case
this is an issue seen with musl based linux distros e.g. alpine [1]
musl is not going to change this since it breaks ABI/API interfaces
Newer compilers are stringent ( e.g. clang16 ) which can now detect
signature mismatches in function pointers too, existing code warned but
did not error with older clang
Fixes
gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types]
v4l2object->ioctl = ioctl;
^ ~~~~~
[1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sys/v4l2/gstv4l2object.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h
index 3a5c961..4f43008 100644
--- a/sys/v4l2/gstv4l2object.h
+++ b/sys/v4l2/gstv4l2object.h
@@ -76,6 +76,8 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
* 'unsigned long' for the 2nd parameter */
#ifdef __ANDROID__
typedef unsigned ioctl_req_t;
+#elif defined(__linux__) && !defined(__GLIBC__) /* musl/linux */
+typedef int ioctl_req_t;
#else
typedef gulong ioctl_req_t;
#endif
--
2.39.1
@@ -0,0 +1,81 @@
require gstreamer1.0-plugins-common.inc
SUMMARY = "'Good' GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues"
SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \
file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch"
SRC_URI[sha256sum] = "d7120c1146a9d723d53d5bfe8074da2575a81f0598438752937f39bb7c833b6a"
S = "${WORKDIR}/gst-plugins-good-${PV}"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
DEPENDS += "gstreamer1.0-plugins-base libcap zlib"
RPROVIDES:${PN}-pulseaudio += "${PN}-pulse"
RPROVIDES:${PN}-soup += "${PN}-souphttpsrc"
RDEPENDS:${PN}-soup += "${MLPREFIX}${@bb.utils.contains('PACKAGECONFIG', 'soup2', 'libsoup-2.4', 'libsoup', d)}"
PACKAGECONFIG_SOUP ?= "soup3"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
${PACKAGECONFIG_SOUP} \
${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'm64', 'asm', '', d)} \
bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 speex taglib v4l2 \
"
X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "qtwayland", "", d)}"
PACKAGECONFIG[asm] = "-Dasm=enabled,-Dasm=disabled,nasm-native"
PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo"
PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394"
PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac"
PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf"
PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3"
PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev"
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg"
PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame"
PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng"
PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
PACKAGECONFIG[soup2] = "-Dsoup=enabled,,libsoup-2.4,,,soup3"
PACKAGECONFIG[soup3] = "-Dsoup=enabled,,libsoup,,,soup2"
PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex"
PACKAGECONFIG[rpi] = "-Drpicamsrc=enabled,-Drpicamsrc=disabled,userland"
PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib"
PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false"
PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx"
PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack"
PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Daalib=disabled \
-Ddirectsound=disabled \
-Ddv=disabled \
-Dlibcaca=disabled \
-Doss=enabled \
-Doss4=disabled \
-Dosxaudio=disabled \
-Dosxvideo=disabled \
-Dshout2=disabled \
-Dtwolame=disabled \
-Dwaveform=disabled \
"
FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
@@ -0,0 +1,19 @@
# This .inc file contains functionality for automatically setting
# the the license of all plugins according to the GSTREAMER_GPL.
PACKAGESPLITFUNCS += "set_gstreamer_license"
python set_gstreamer_license () {
import oe.utils
pn = d.getVar('PN') + '-'
gpl_plugins_names = [pn+plugin for plugin in d.getVar('GSTREAMER_GPL').split()]
for pkg in oe.utils.packages_filter_out_system(d):
if pkg in gpl_plugins_names:
d.setVar('LICENSE:' + pkg, 'GPL-2.0-or-later')
else:
d.setVar('LICENSE:' + pkg, 'LGPL-2.1-or-later')
}
EXTRA_OEMESON += " \
${@bb.utils.contains_any('PACKAGECONFIG', "${GSTREAMER_GPL}", '-Dgpl=enabled', '-Dgpl=disabled', d)} \
"
@@ -0,0 +1,73 @@
# This .inc file contains functionality for automatically splitting
# built plugins into individual packages for each plugin. A -meta
# package is also set up that has no files of its own, but contains
# the names of all plugin packages in its RDEPENDS list.
#
# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes,
# but can be used in any recipe that produces GStreamer plugins.
# Dynamically generate packages for all enabled plugins
PACKAGES_DYNAMIC = "^${PN}-.* ^libgst.*"
PACKAGESPLITFUNCS =+ "split_gstreamer10_packages"
PACKAGESPLITFUNCS += "set_gstreamer10_metapkg_rdepends"
python split_gstreamer10_packages () {
gst_libdir = d.expand('${libdir}/gstreamer-1.0')
postinst = d.getVar('plugin_postinst')
glibdir = d.getVar('libdir')
# GStreamer libraries
do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True)
# GStreamer plugin shared objects
do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='')
# GObject introspection files for GStreamer plugins
do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer 1.0 typelib file for %s', postinst=postinst, extra_depends='')
# Static GStreamer libraries for development
do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer 1.0 plugin for %s (static development files)', extra_depends='${PN}-staticdev')
}
python set_gstreamer10_metapkg_rdepends () {
import os
import oe.utils
# Go through all generated packages (excluding the main package and
# the -meta package itself) and add them to the -meta package as RDEPENDS.
pn = d.getVar('PN')
metapkg = pn + '-meta'
d.setVar('ALLOW_EMPTY:' + metapkg, "1")
d.setVar('FILES:' + metapkg, "")
exclude = [ pn, pn + '-meta' ]
metapkg_rdepends = []
pkgdest = d.getVar('PKGDEST')
for pkg in oe.utils.packages_filter_out_system(d):
if pkg not in exclude and pkg not in metapkg_rdepends:
# See if the package is empty by looking at the contents of its PKGDEST subdirectory.
# If this subdirectory is empty, then the package is.
# Empty packages do not get added to the meta package's RDEPENDS
pkgdir = os.path.join(pkgdest, pkg)
if os.path.exists(pkgdir):
dir_contents = os.listdir(pkgdir) or []
else:
dir_contents = []
is_empty = len(dir_contents) == 0
if not is_empty:
metapkg_rdepends.append(pkg)
d.setVar('RDEPENDS:' + metapkg, ' '.join(metapkg_rdepends))
d.setVar('DESCRIPTION:' + metapkg, pn + ' meta package')
}
# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev
# so we need them even when empty (like in gst-plugins-good case)
ALLOW_EMPTY:${PN} = "1"
ALLOW_EMPTY:${PN}-dev = "1"
ALLOW_EMPTY:${PN}-staticdev = "1"
PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
FILES:${PN} = ""
FILES:${PN}-apps = "${bindir}"
FILES:${PN}-glib = "${datadir}/glib-2.0"
RRECOMMENDS:${PN} += "${PN}-meta"
@@ -0,0 +1,46 @@
require gstreamer1.0-plugins-common.inc
require gstreamer1.0-plugins-license.inc
SUMMARY = "'Ugly GStreamer plugins"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues"
LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
"
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
LICENSE_FLAGS = "commercial"
SRC_URI = " \
https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "ffb461fda6c06d316c4be5682632cc8901454ed72b1098b1e0221bc55e673cd7"
S = "${WORKDIR}/gst-plugins-ugly-${PV}"
DEPENDS += "gstreamer1.0-plugins-base"
GST_PLUGIN_SET_HAS_EXAMPLES = "0"
PACKAGECONFIG ??= " \
${GSTREAMER_ORC} \
a52dec mpeg2dec \
"
PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr"
PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr"
PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52"
PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio"
PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread"
PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec"
PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264"
GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'a52dec cdio dvdread mpeg2dec x264', d)}"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dsidplay=disabled \
"
FILES:${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
FILES:${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
@@ -0,0 +1,30 @@
SUMMARY = "Python bindings for GStreamer 1.0"
DESCRIPTION = "GStreamer Python binding overrides (complementing the bindings \
provided by python-gi) "
HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
SRC_URI[sha256sum] = "e1302dcc0f2451b64380dcc0dd3b82735795e8951dc812d938d8ba91f388163e"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
RDEPENDS:${PN} += "gstreamer1.0 gstreamer1.0-plugins-base python3-pygobject"
PNREAL = "gst-python"
S = "${WORKDIR}/${PNREAL}-${PV}"
EXTRA_OEMESON += "\
-Dtests=disabled \
-Dplugin=enabled \
-Dlibpython-dir=${libdir} \
"
inherit meson pkgconfig setuptools3-base upstream-version-is-even features_check
FILES:${PN} += "${libdir}/gstreamer-1.0"
REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
@@ -0,0 +1,31 @@
SUMMARY = "A library on top of GStreamer for building an RTSP server"
HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base"
PNREAL = "gst-rtsp-server"
SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
SRC_URI[sha256sum] = "4666612d7a99c60dcd6f0bdba1b7a74d2562a0501b2a3e0576f0916bf1d8811b"
S = "${WORKDIR}/${PNREAL}-${PV}"
inherit meson pkgconfig upstream-version-is-even gobject-introspection
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dexamples=disabled \
-Dtests=disabled \
"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well
require gstreamer1.0-plugins-packaging.inc
CVE_PRODUCT += "gst-rtsp-server"
@@ -0,0 +1,53 @@
SUMMARY = "VA-API support to GStreamer"
HOMEPAGE = "https://gstreamer.freedesktop.org/"
DESCRIPTION = "gstreamer-vaapi consists of a collection of VA-API \
based plugins for GStreamer and helper libraries: `vaapidecode', \
`vaapiconvert', and `vaapisink'."
REALPN = "gstreamer-vaapi"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz"
SRC_URI[sha256sum] = "967b8e353d82d0081a68dc53639b25d9fb4ca89bfa1e061403e0cd7d23585ba6"
S = "${WORKDIR}/${REALPN}-${PV}"
DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
inherit meson pkgconfig features_check upstream-version-is-even
REQUIRED_DISTRO_FEATURES ?= "opengl"
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dexamples=disabled \
-Dtests=enabled \
"
PACKAGES =+ "${PN}-tests"
# OpenGL packageconfig factored out to make it easy for distros
# and BSP layers to pick either glx, egl, or no GL. By default,
# try detecting X11 first, and if found (with OpenGL), use GLX,
# otherwise try to check if EGL can be used.
PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', \
bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \
'', d), d)}"
PACKAGECONFIG ??= "drm encoders \
${PACKAGECONFIG_GL} \
${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
PACKAGECONFIG[drm] = "-Ddrm=enabled,-Ddrm=disabled,udev libdrm"
PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
PACKAGECONFIG[encoders] = "-Dencoders=enabled,-Dencoders=disabled"
PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,virtual/libgl"
PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxrandr libxrender"
FILES:${PN} += "${libdir}/gstreamer-*/*.so"
FILES:${PN}-dbg += "${libdir}/gstreamer-*/.debug"
FILES:${PN}-dev += "${libdir}/gstreamer-*/*.a"
FILES:${PN}-tests = "${bindir}/*"
@@ -0,0 +1,34 @@
From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
Subject: [PATCH] tests: respect the idententaion used in meson
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
tests/check/meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/check/meson.build b/tests/check/meson.build
index 9787b0a..16caac7 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -145,11 +145,11 @@ foreach t : core_tests
if not skip_test
exe = executable(test_name, fname,
- c_args : gst_c_args + test_defines,
- cpp_args : gst_c_args + test_defines,
- include_directories : [configinc],
- link_with : link_with_libs,
- dependencies : gst_deps + test_deps,
+ c_args : gst_c_args + test_defines,
+ cpp_args : gst_c_args + test_defines,
+ include_directories : [configinc],
+ link_with : link_with_libs,
+ dependencies : gst_deps + test_deps,
)
env = environment()
@@ -0,0 +1,107 @@
From 08b1aaff972a7f6349373fc1ad4cc23081adb52c Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 11 Apr 2021 19:48:13 +0100
Subject: [PATCH] tests: add support for install the tests
This will provide to run the tests using the gnome-desktop-testing [1]
[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
meson.build | 4 ++++
meson_options.txt | 1 +
tests/check/meson.build | 22 +++++++++++++++++++++-
tests/check/template.test.in | 3 +++
4 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 tests/check/template.test.in
diff --git a/meson.build b/meson.build
index f9f591d..3906fb3 100644
--- a/meson.build
+++ b/meson.build
@@ -606,6 +606,10 @@ if bashcomp_dep.found()
endif
endif
+installed_tests_enabled = get_option('installed_tests')
+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
pkgconfig = import('pkgconfig')
diff --git a/meson_options.txt b/meson_options.txt
index 7363bdb..a34ba37 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
option('memory-alignment', type: 'combo',
choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
value: 'malloc')
+option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
# Feature options
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
diff --git a/tests/check/meson.build b/tests/check/meson.build
index 16caac7..f2d400f 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -124,10 +124,16 @@ test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
'-DGST_DISABLE_DEPRECATED',
]
+testfile = meson.current_source_dir() + '/meson.build'
+if installed_tests_enabled
+ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile')
+ testfile = installed_tests_metadir + '/testfile'
+endif
+test_defines += '-DTESTFILE="@0@"'.format(testfile)
+
# sanity checking
if get_option('check').disabled()
if get_option('tests').enabled()
@@ -150,6 +156,8 @@ foreach t : core_tests
include_directories : [configinc],
link_with : link_with_libs,
dependencies : gst_deps + test_deps,
+ install_dir: installed_tests_execdir,
+ install: installed_tests_enabled,
)
env = environment()
@@ -161,6 +169,18 @@ foreach t : core_tests
env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
+ if installed_tests_enabled
+ test_conf = configuration_data()
+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
+ test_conf.set('program', test_name)
+ configure_file(
+ input: 'template.test.in',
+ output: test_name + '.test',
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
+ endif
+
test(test_name, exe, env: env, timeout : 3 * 60)
endif
endforeach
diff --git a/tests/check/template.test.in b/tests/check/template.test.in
new file mode 100644
index 0000000..f701627
--- /dev/null
+++ b/tests/check/template.test.in
@@ -0,0 +1,3 @@
+[Test]
+Type=session
+Exec=@installed_tests_dir@/@program@
@@ -0,0 +1,50 @@
From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 24 Apr 2021 10:34:47 +0100
Subject: [PATCH 3/4] tests: use a dictionaries for environment
meson environment() can't be passed to configure_file and it is needed for installed_tests,
use a dictionary as this is simplest solution to install the environment.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
index 00a138a568..48ec2532f8 100644
--- a/subprojects/gstreamer/tests/check/meson.build
+++ b/subprojects/gstreamer/tests/check/meson.build
@@ -161,14 +161,19 @@ foreach t : core_tests
install: installed_tests_enabled,
)
- env = environment()
- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
- env.set('GST_STATE_IGNORE_ELEMENTS', '')
- env.set('CK_DEFAULT_TIMEOUT', '20')
- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
+ # meson environment object can't be passed to configure_file and
+ # installed tests uses configure_file to install the environment.
+ # use a dictionary as this is the simplest solution
+ # to install the environment.
+ env = {
+ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
+ 'GST_STATE_IGNORE_ELEMENTS': '',
+ 'CK_DEFAULT_TIMEOUT': '20',
+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
+ }
if installed_tests_enabled
test_conf = configuration_data()
--
2.33.1
@@ -0,0 +1,74 @@
From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 2 May 2021 01:58:01 +0100
Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
- this is a bash script that will run the installed_tests
with some of the environment variables used in the meson
testing framework.
Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
.../gstreamer/tests/check/template.sh.in | 9 +++++++++
.../gstreamer/tests/check/template.test.in | 2 +-
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
index 48ec2532f8..7dc4990d4e 100644
--- a/subprojects/gstreamer/tests/check/meson.build
+++ b/subprojects/gstreamer/tests/check/meson.build
@@ -185,6 +185,23 @@ foreach t : core_tests
install_dir: installed_tests_metadir,
configuration: test_conf
)
+
+ # All the tests will be deployed on the target machine and
+ # we use the home folder ~ for the registry which will then expand at runtime.
+ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
+ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
+ # that is useful for debug propose of the tests itself.
+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
+
+ # Set the full path for the test it self.
+ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
+
+ configure_file(
+ input : 'template.sh.in',
+ output: test_name + '.sh',
+ install_dir: installed_tests_execdir,
+ configuration : env,
+ )
endif
test(test_name, exe, env: env, timeout : 3 * 60)
diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
new file mode 100755
index 0000000000..cf7d31b0ea
--- /dev/null
+++ b/subprojects/gstreamer/tests/check/template.sh.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -ax
+
+CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
+GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
+GST_REGISTRY=@GST_REGISTRY@
+GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
+exec @TEST@
diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
index f701627f87..b74ef6ad73 100644
--- a/subprojects/gstreamer/tests/check/template.test.in
+++ b/subprojects/gstreamer/tests/check/template.test.in
@@ -1,3 +1,3 @@
[Test]
Type=session
-Exec=@installed_tests_dir@/@program@
+Exec=@installed_tests_dir@/@program@.sh
--
2.33.1
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
gnome-desktop-testing-runner gstreamer
@@ -0,0 +1,74 @@
SUMMARY = "GStreamer 1.0 multimedia framework"
DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \
It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime."
HOMEPAGE = "http://gstreamer.freedesktop.org/"
BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-or-later"
DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome
LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
S = "${WORKDIR}/gstreamer-${PV}"
SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
file://run-ptest \
file://0001-tests-respect-the-idententaion-used-in-meson.patch \
file://0002-tests-add-support-for-install-the-tests.patch \
file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
"
SRC_URI[sha256sum] = "11cb0498bc16b93d8b99d22f75f829b8d0abfd8254840b2120618db5532dc655"
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
check \
debug \
tools"
PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false"
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native"
# TODO: put this in a gettext.bbclass patch
def gettext_oemeson(d):
if d.getVar('USE_NLS') == 'no':
return '-Dnls=disabled'
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
return '-Dnls=disabled'
return '-Dnls=enabled'
EXTRA_OEMESON += " \
-Ddoc=disabled \
-Dexamples=disabled \
-Ddbghelp=disabled \
${@gettext_oemeson(d)} \
"
GIR_MESON_ENABLE_FLAG = "enabled"
GIR_MESON_DISABLE_FLAG = "disabled"
PACKAGES += "${PN}-bash-completion"
# Add the core element plugins to the main package
FILES:${PN} += "${libdir}/gstreamer-1.0/*.so"
FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb"
RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-5"
CVE_PRODUCT = "gstreamer"
PTEST_BUILD_HOST_FILES = ""
@@ -0,0 +1,20 @@
Upstream-Status: Inappropriate [configuration]
# Acquired from OpenEmbedded
--- lame-3.96.1/configure.in~no-gtk1.patch 2004-07-25 15:52:12.000000000 +0100
+++ lame-3.96.1/configure.in 2004-09-10 15:54:39.000000000 +0100
@@ -363,7 +363,12 @@
dnl configure use of features
-AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
+#AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
+HAVE_GTK="no"
+GTK_CFLAGS=""
+GTK_LIBS=""
+AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GTK_LIBS)
dnl ElectricFence malloc debugging
AC_MSG_CHECKING(use of ElectricFence malloc debugging)
@@ -0,0 +1,26 @@
SUMMARY = "High quality MP3 audio encoder"
DESCRIPTION = "LAME is an educational tool to be used for learning about MP3 encoding."
HOMEPAGE = "https://lame.sourceforge.io/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
SECTION = "console/utils"
LICENSE = "LGPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b \
"
DEPENDS = "ncurses gettext-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
file://no-gtk1.patch \
"
SRC_URI[md5sum] = "83e260acbe4389b54fe08e0bdbf7cddb"
SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e"
inherit autotools pkgconfig
PACKAGES += "libmp3lame libmp3lame-dev"
FILES:${PN} = "${bindir}/lame"
FILES:libmp3lame = "${libdir}/libmp3lame.so.*"
FILES:libmp3lame-dev = "${includedir} ${libdir}/*"
FILES:${PN}-dev = ""
@@ -0,0 +1,89 @@
It makes much more sense to control our own CFLAGS and avoiding fPIC breaks
some arches too. Assume we know what we're doing and remove all the messing
around.
RP 23/2/10
Upstream-Status: Inappropriate [configuration]
Index: a52dec-0.7.4/configure.in
===================================================================
--- a52dec-0.7.4.orig/configure.in 2010-02-23 14:51:50.000000000 +0000
+++ a52dec-0.7.4/configure.in 2010-02-23 14:52:36.000000000 +0000
@@ -14,62 +14,6 @@
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
-if test x"$GCC" = x"yes"; then
-
- dnl GCC-specific flags - try to optimize them sometime
- dnl -Wall -Werror moved to the end to not disturb the configure script
-
- dnl -O3
- changequote(<<,>>)
- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
- changequote([,])
- OPT_CFLAGS="$OPT_CFLAGS -O3"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
-
- dnl -fomit-frame-pointer
- OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
-
- dnl arch-specific flags
- case "$host" in
- i?86-* | k?-*)
- case "$host" in
- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
- esac
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
- sparc-* | sparc64-*)
- OPT_CFLAGS="$CFLAGS -mtune=ultrasparc"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
- mips-sgi-irix6.*) dnl do we need to be that specific ?
- OPT_CFLAGS="$CFLAGS -mabi=64"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
- esac
-elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
- dnl TenDRA portability checking compiler
- TENDRA=yes
- CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE"
- enable_mlib=no
- enable_oss=no
- enable_solaris_audio=no
-elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
- dnl Intel C++ compiler
- CFLAGS="-g -O3 -unroll -ip"
-else
- dnl non-gcc flags - we probably need exact configuration triplets here.
- case "$host" in
- mips-sgi-irix6.*)
- OPT_CFLAGS="$CFLAGS -64"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
- sparc-sun-solaris*)
- OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
- esac
-fi
-
dnl Checks for libtool - this must be done after we set cflags
AC_DISABLE_SHARED
AC_LIBTOOL_WIN32_DLL
Index: a52dec-0.7.4/liba52/configure.incl
===================================================================
--- a52dec-0.7.4.orig/liba52/configure.incl 2010-02-23 14:51:44.000000000 +0000
+++ a52dec-0.7.4/liba52/configure.incl 2010-02-23 14:51:59.000000000 +0000
@@ -1,9 +1,6 @@
AC_SUBST([LIBA52_CFLAGS])
AC_SUBST([LIBA52_LIBS])
-dnl avoid -fPIC when possible
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
-
AC_ARG_ENABLE([double],
[ --enable-double use double-precision samples])
if test x"$enable_double" = x"yes"; then
@@ -0,0 +1,29 @@
SUMMARY = "ATSC A/52 surround sound stream decoder"
DESCRIPTION = "Library for decoding ATSC A/52 streams. The A/52 standard \
is used in a variety of applications, including digital television \
and DVD. It is also known as AC-3."
HOMEPAGE = "http://liba52.sourceforge.net/"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
file://include/a52.h;beginline=1;endline=12;md5=81152ceb3562bf20a60d1b6018175dd1"
SECTION = "libs"
PR = "r4"
inherit autotools
SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \
file://buildcleanup.patch"
SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80"
SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33"
UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html"
S = "${WORKDIR}/a52dec-${PV}"
EXTRA_OECONF = " --enable-shared "
PACKAGES =+ "a52dec a52dec-doc"
FILES:a52dec = " ${bindir}/* "
FILES:a52dec-doc = " ${mandir}/man1/* "
@@ -0,0 +1,17 @@
SUMMARY = "Ogg bitstream and framing libary"
DESCRIPTION = "libogg is the bitstream and framing library \
for the Ogg project. It provides functions which are \
necessary to codec libraries like libvorbis."
HOMEPAGE = "http://xiph.org/"
BUGTRACKER = "https://trac.xiph.org/newticket"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \
file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b"
SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz"
SRC_URI[md5sum] = "3178c98341559657a15b185bf5d700a5"
SRC_URI[sha256sum] = "c4d91be36fc8e54deae7575241e03f4211eb102afb3fc0775fbbc1b740016705"
inherit autotools pkgconfig
@@ -0,0 +1,58 @@
To enable --disable-Werror for libomxil to avoid some compilers which check code strictly.
For example, at least the following errors happened to some compilers:
1) OMX_INDEXTYPE in include/OMX_Index.h IS NOT OMX_INDEXVENDORTYPE in src/base/omx_base_component.h
| i586-poky-linux-libtool: compile: i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_Climinate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c OMXComponentRMExt.c -fPIC -DPIC -o .libs/libomxbase_la-OMXComponentRMExt.o
| omx_base_component.c: In function 'omx_base_component_GetParameter':
| omx_base_component.c:991:3: error: case value '2130706435' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch]
| omx_base_component.c:918:3: error: case value '2130706436' not in enumerated type 'OMX_INDEXTYPE' [-Werror=switch]
2)
| i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/yocto-build5/poky/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I.. -DOMXILCOMPOminate-unused-debug-types -Wall -Werror -DCONFIG_DEBUG_LEVEL=0 -c -o omxregister_bellagio-omxregister.o `test -f 'omxregister.c' || echo './'`o
| omxregister.c: In function 'buildComponentsList':
| omxregister.c:175:7: error: variable 'err' set but not used [-Werror=unused-but-set-variable]
| cc1: all warnings being treated as errors
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Shane Wang <shane.wang@intel.com>
diff -r 82d742d3ea90 configure.ac
--- a/configure.ac Tue Dec 27 15:30:35 2011 +0800
+++ b/configure.ac Tue Dec 27 16:26:03 2011 +0800
@@ -5,7 +5,7 @@
AC_PREREQ([2.59])
AC_CONFIG_HEADERS([config.h])
-CFLAGS="${CFLAGS} -Wall -Werror"
+CFLAGS="${CFLAGS} -Wall"
################################################################################
# Set the shared versioning info, according to section 6.3 of the libtool info #
@@ -122,6 +122,14 @@
[with_android=$enableval],
[with_android=no])
+AC_ARG_ENABLE(
+ [Werror],
+ [AC_HELP_STRING(
+ [--disable-Werror],
+ [whether to diable treating gcc warnings as errors])],
+ [with_Werror=$enableval],
+ [with_Werror=yes])
+
################################################################################
# Check for programs #
################################################################################
@@ -193,6 +201,10 @@
CFG_DEBUG_LEVEL=255
fi
+if test "x$with_Werror" = "xyes"; then
+ CFLAGS="${CFLAGS} -Werror"
+fi
+
AC_SUBST(CFG_DEBUG_LEVEL)
CFLAGS="${CFLAGS} -DCONFIG_DEBUG_LEVEL=$CFG_DEBUG_LEVEL"
@@ -0,0 +1,36 @@
Disable so versioning since they are really not a versioned shared lib.
Upstream-Status: Submitted @ https://sourceforge.net/p/omxil/bugs/59/
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
diff -rub libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am
--- libomxil-bellagio-0.9.3-orig/src/components/audio_effects/Makefile.am 2014-07-20 15:22:00.858425234 -0400
+++ libomxil-bellagio-0.9.3/src/components/audio_effects/Makefile.am 2014-07-20 15:25:42.687525225 -0400
@@ -10,4 +10,5 @@
libomxaudio_effects_la_CFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/base
+libomxaudio_effects_la_LDFLAGS = -avoid-version
diff -rub libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am
--- libomxil-bellagio-0.9.3-orig/src/components/clocksrc/Makefile.am 2014-07-20 15:22:00.858425234 -0400
+++ libomxil-bellagio-0.9.3/src/components/clocksrc/Makefile.am 2014-07-20 15:24:49.151259753 -0400
@@ -10,4 +10,4 @@
-I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/base
-
+libomxclocksrc_la_LDFLAGS = -avoid-version
diff -rub libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am
--- libomxil-bellagio-0.9.3-orig/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:00.862425254 -0400
+++ libomxil-bellagio-0.9.3/src/components/videoscheduler/Makefile.am 2014-07-20 15:22:36.462601786 -0400
@@ -6,7 +6,7 @@
library_entry_point.c
libomxvideosched_la_LIBADD = $(top_builddir)/src/libomxil-bellagio.la
-libomxvideosched_la_LDFLAGS =
+libomxvideosched_la_LDFLAGS = -avoid-version
libomxvideosched_la_CFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/base
@@ -0,0 +1,20 @@
This patch fixes link issue when libomxdynamicloader.so is loaded :
Missing symbol RM_Deinit.
This patch comes from "http://pkgs.fedoraproject.org/cgit/libomxil-bellagio.git/commit/?h=f17&id=4996a95828943d345e51ded6876c3103653eecf8"
Upstream-Status: Pending
Signed-off-by: Sébastien Mennetrier <s.mennetrier@innotis.org>
--- a/src/dynamic_loader/Makefile.am 2014-02-25 15:29:10.128549636 +0100
+++ b/src/dynamic_loader/Makefile.am 2014-02-25 15:30:15.756548808 +0100
@@ -3,7 +3,7 @@
omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la
libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h
-libomxdynamicloader_la_LDFLAGS =
+libomxdynamicloader_la_LDFLAGS = -lomxil-bellagio -L$(top_builddir)/src/.libs
libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/base \
@@ -0,0 +1,19 @@
This patch is to remove DESTDIR in docdir.
Otherwise, when users install by running `make install DESTDIR=/alternate/directory' specified in the file INSTALL, the doc will go into /alternate/directory/alternate/directory, which is not expected.
Upstream-Status: Pending
Signed-off-by: Shane Wang <shane.wang@intel.com>
diff -r 30b597e4e70d Makefile.am
--- a/Makefile.am Wed Dec 28 15:38:35 2011 +0800
+++ b/Makefile.am Wed Dec 28 15:39:25 2011 +0800
@@ -7,7 +7,7 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libomxil-bellagio.pc
-docdir = $(DESTDIR)$(prefix)/share/doc/@PACKAGE@
+docdir = $(prefix)/share/doc/@PACKAGE@
doc_DATA = README \
ChangeLog \
TODO
@@ -0,0 +1,18 @@
This patch is to make libomxil Makefile support "make -jN".
The omxregister_bellagio stuffs depend on libomxil_bellagio library.
Upstream-Status: Pending
Signed-off-by: Shane Wang <shane.wang@intel.com>
diff -r f59d077d3dd5 Makefile.am
--- a/src/Makefile.am Wed Dec 28 10:54:36 2011 +0800
+++ b/src/Makefile.am Wed Dec 28 10:55:46 2011 +0800
@@ -7,6 +7,7 @@
omxregister_bellagio_SOURCES = omxregister.c common.c common.h
omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \
-I$(top_srcdir)/include
+omxregister_bellagio_LDADD = $(lib_LTLIBRARIES)
omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir)
lib_LTLIBRARIES = libomxil-bellagio.la
@@ -0,0 +1,45 @@
SUMMARY = "Bellagio OpenMAX Integration Layer (IL)"
DESCRIPTION = "Bellagio is an opensource implementation of the Khronos OpenMAX \
Integration Layer API to access multimedia components."
HOMEPAGE = "http://omxil.sourceforge.net/"
LICENSE = "LGPL-2.1-or-later"
LICENSE_FLAGS = "${@bb.utils.contains('PACKAGECONFIG', 'amr', 'commercial', '', d)}"
LIC_FILES_CHKSUM = "file://COPYING;md5=ae6f0f4dbc7ac193b50f323a6ae191cb \
file://src/omxcore.h;beginline=1;endline=27;md5=806b1e5566c06486fe8e42b461e03a90"
SRC_URI = "${SOURCEFORGE_MIRROR}/omxil/libomxil-bellagio-${PV}.tar.gz \
file://configure-fix.patch \
file://parallel-make.patch \
file://makefile-docdir-fix.patch \
file://dynamicloader-linking.patch \
file://disable-so-versioning.patch"
SRC_URI[md5sum] = "a1de827fdb75c02c84e55f740ca27cb8"
SRC_URI[sha256sum] = "593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c"
S = "${WORKDIR}/${BPN}-bellagio-${PV}"
inherit autotools
EXTRA_OECONF += "--disable-doc --disable-Werror"
PROVIDES += "virtual/libomxil"
CFLAGS += "-fcommon"
PACKAGECONFIG ??= ""
PACKAGECONFIG[amr] = "--enable-amr,,"
#
# The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked.
# Make sure they get packaged in the main package.
#
FILES:${PN} += "${libdir}/bellagio/*.so \
${libdir}/omxloaders/*${SOLIBS}"
FILES:${PN}-staticdev += "${libdir}/bellagio/*.a \
${libdir}/omxloaders/*.a"
FILES:${PN}-dev += "${libdir}/bellagio/*.la \
${libdir}/omxloaders/*.la \
${libdir}/omxloaders/*${SOLIBSDEV}"
@@ -0,0 +1,35 @@
SUMMARY = "PNG image format decoding library"
DESCRIPTION = "An open source project to develop and maintain the reference \
library for use in applications that read, create, and manipulate PNG \
(Portable Network Graphics) raster image files. "
HOMEPAGE = "http://www.libpng.org/"
SECTION = "libs"
LICENSE = "Libpng"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8f533bc367bfd43f556b6f782234c076"
DEPENDS = "zlib"
LIBV = "16"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz"
SRC_URI[sha256sum] = "535b479b2467ff231a3ec6d92a525906fb8ef27978be4f66dbe05d3f3a01b3a1"
MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/"
UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html"
BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
inherit autotools binconfig-disabled pkgconfig
# Work around missing symbols
ARMNEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off", d)}"
ARMNEON:aarch64 = "--enable-hardware-optimizations=on"
EXTRA_OECONF += "${ARMNEON}"
PACKAGES =+ "${PN}-tools"
FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp"
BBCLASSEXTEND = "native nativesdk"
CVE_STATUS[CVE-2019-17371] = "cpe-incorrect: A memory leak in gif2png 2.x"
@@ -0,0 +1,26 @@
SUMMARY = "Audio Sample Rate Conversion library"
DESCRIPTION = "Also known as Secret Rabbit Code - a library for performing sample rate conversion of audio data."
HOMEPAGE = "https://libsndfile.github.io/libsamplerate/"
SECTION = "libs"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=336d6faf40fb600bafb0061f4052f1f4 \
file://src/samplerate.c;beginline=1;endline=7;md5=7a4238289dc36bfb70968ccaa5bd0d4f"
DEPENDS = "libsndfile1"
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsamplerate-${PV}.tar.xz \
"
SRC_URI[sha256sum] = "3258da280511d24b49d6b08615bbe824d0cacc9842b0e4caf11c52cf2b043893"
CVE_PRODUCT = "libsamplerate"
GITHUB_BASE_URI = "https://github.com/libsndfile/libsamplerate/releases"
S = "${WORKDIR}/libsamplerate-${PV}"
inherit autotools pkgconfig github-releases
# FFTW and ALSA are only used in tests and examples, so they don't affect
# normal builds. It should be safe to ignore these, but explicitly disabling
# them adds some extra certainty that builds are deterministic.
EXTRA_OECONF = "--disable-fftw --disable-alsa"
@@ -0,0 +1,68 @@
From 593256a3e386a4e17fe26cfbfb813cf4996447d7 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Mon, 4 Apr 2022 19:46:44 +0200
Subject: [PATCH] Disable opus library
We don't have opus in OE-Core which causes all the external libs to be disabled
silently. The silent issue is discussed in the link below and hints a patch
to make things configurable may be accepted.
This patch removing the opus piece at least gets most of the functionality
we previously used back whilst the issue is discussed.
Upstream-Status: Denied [https://github.com/libsndfile/libsndfile/pull/812]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
configure.ac | 10 +++++-----
src/ogg_opus.c | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 727b67bc..f9d2e447 100644
--- a/configure.ac
+++ b/configure.ac
@@ -373,13 +373,13 @@ AS_IF([test -n "$PKG_CONFIG"], [
enable_external_libs=yes
])
- AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc$ac_cv_opus" = "xyesyesyesyesyes"], [
+ AS_IF([test "x$ac_cv_flac$ac_cv_ogg$ac_cv_vorbis$ac_cv_vorbisenc" = "xyesyesyesyes"], [
HAVE_EXTERNAL_XIPH_LIBS=1
enable_external_libs=yes
- EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OPUS_CFLAGS $OGG_CFLAGS "
- EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OPUS_LIBS $OGG_LIBS "
- EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc opus"
+ EXTERNAL_XIPH_CFLAGS="$FLAC_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS $OGG_CFLAGS "
+ EXTERNAL_XIPH_LIBS="$FLAC_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS $OGG_LIBS "
+ EXTERNAL_XIPH_REQUIRE="flac ogg vorbis vorbisenc"
if test x$ac_cv_speex = "xyes" ; then
EXTERNAL_XIPH_REQUIRE="$EXTERNAL_XIPH_REQUIRE speex"
@@ -788,7 +788,7 @@ AC_MSG_RESULT([
Experimental code : ................... ${enable_experimental:-no}
Using ALSA in example programs : ...... ${enable_alsa:-no}
- External FLAC/Ogg/Vorbis/Opus : ....... ${enable_external_libs:-no}
+ External FLAC/Ogg/Vorbis : ....... ${enable_external_libs:-no}
External MPEG Lame/MPG123 : ........... ${enable_mpeg:-no}
Building Octave interface : ........... ${OCTAVE_BUILD}
diff --git a/src/ogg_opus.c b/src/ogg_opus.c
index dfa446ee..0d4fe57b 100644
--- a/src/ogg_opus.c
+++ b/src/ogg_opus.c
@@ -159,7 +159,7 @@
#include "sfendian.h"
#include "common.h"
-#if HAVE_EXTERNAL_XIPH_LIBS
+#if 0
#include <ogg/ogg.h>
#include <opus/opus.h>
--
2.30.2
@@ -0,0 +1,32 @@
SUMMARY = "Audio format Conversion library"
DESCRIPTION = "Library for reading and writing files containing sampled \
sound (such as MS Windows WAV and the Apple/SGI AIFF format) through \
one standard library interface."
HOMEPAGE = "https://libsndfile.github.io/libsndfile/"
AUTHOR = "Erik de Castro Lopo"
DEPENDS = "flac libogg libvorbis"
SECTION = "libs/multimedia"
LICENSE = "LGPL-2.1-only"
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \
file://noopus.patch \
"
GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/"
SRC_URI[sha256sum] = "0e30e7072f83dc84863e2e55f299175c7e04a5902ae79cfb99d4249ee8f6d60a"
LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
CVE_PRODUCT = "libsndfile"
S = "${WORKDIR}/libsndfile-${PV}"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3"
inherit autotools lib_package pkgconfig multilib_header github-releases
do_install:append() {
oe_multilib_header sndfile.h
}
@@ -0,0 +1,15 @@
Upstream-Status: Inappropriate [configuration]
Index: libtheora-1.1.1/Makefile.am
===================================================================
--- libtheora-1.1.1.orig/Makefile.am 2009-11-25 22:01:53.593775926 +0100
+++ libtheora-1.1.1/Makefile.am 2009-11-25 22:02:00.777524017 +0100
@@ -8,7 +8,7 @@
EXAMPLES_DIR =
endif
-SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR)
+SUBDIRS = lib include tests m4 $(EXAMPLES_DIR)
# we include the whole debian/ dir in EXTRA_DIST because there's a problem
@@ -0,0 +1,22 @@
SUMMARY = "Theora Video Codec"
DESCRIPTION = "The libtheora reference implementation provides the standard encoder and decoder under a BSD license."
HOMEPAGE = "http://xiph.org/"
BUGTRACKER = "https://trac.xiph.org/newticket"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132"
DEPENDS = "libogg"
PR = "r1"
SRC_URI = "http://downloads.xiph.org/releases/theora/libtheora-${PV}.tar.bz2 \
file://no-docs.patch"
SRC_URI[md5sum] = "292ab65cedd5021d6b7ddd117e07cd8e"
SRC_URI[sha256sum] = "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-examples"
@@ -0,0 +1,59 @@
SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
DESCRIPTION = "Library provides support for the Tag Image File Format \
(TIFF), a widely used format for storing image data. This library \
provide means to easily access and create TIFF image files."
HOMEPAGE = "http://www.libtiff.org/"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a3e32d664d6db1386b4689c8121531c3"
CVE_PRODUCT = "libtiff"
SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz"
SRC_URI[sha256sum] = "d7f38b6788e4a8f5da7940c5ac9424f494d8a79eba53d555f4a507167dca5e2b"
# exclude betas
UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
CVE_STATUS[CVE-2015-7313] = "fixed-version: Tested with check from https://security-tracker.debian.org/tracker/CVE-2015-7313 and already 4.3.0 doesn't have the issue"
inherit autotools multilib_header
CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
PACKAGECONFIG ?= "cxx jpeg zlib lzma \
strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
PACKAGECONFIG[jbig] = "--enable-jbig,--disable-jbig,jbig,"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp,"
PACKAGECONFIG[zstd] = "--enable-zstd,--disable-zstd,zstd,"
PACKAGECONFIG[libdeflate] = "--enable-libdeflate,--disable-libdeflate,libdeflate,"
# Convert single-strip uncompressed images to multiple strips of specified
# size (default: 8192) to reduce memory usage
PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
# Control picking up YCbCr subsample info. Disable to support files lacking
# the tag
PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
# Support a mechanism allowing reading large strips (usually one strip files)
# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
PACKAGES =+ "tiffxx tiff-utils"
FILES:tiffxx = "${libdir}/libtiffxx.so.*"
FILES:tiff-utils = "${bindir}/*"
do_install:append() {
oe_multilib_header tiffconf.h
}
BBCLASSEXTEND = "native nativesdk"
@@ -0,0 +1,56 @@
From d619ccf6c11ab574466914c57994a82fb99401af Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 22 Mar 2017 16:06:55 +0000
Subject: [PATCH] configure: Check for clang
Disable gcc specific options if using clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
configure.ac | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 28b0a14..2d4e984 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples,
AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = xyes])
+AC_MSG_CHECKING([whether C compiler is clang])
+$CC -x c /dev/null -dM -E > conftest.txt 2>&1
+if grep "__clang__" conftest.txt >/dev/null 2>&1; then
+ AC_SUBST([CC_CLANG], [1])
+ AC_MSG_RESULT([yes])
+ else
+ AC_SUBST([CC_CLANG], [0])
+ AC_MSG_RESULT([no])
+fi
+
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
@@ -132,10 +142,15 @@ else
AC_MSG_RESULT([$GCC_VERSION])
case $host in
*86-*-linux*)
+ if test "$CC_CLANG" = "1"; then
+ ieeefp=""
+ else
+ ieefp="-mno-ieee-fp"
+ fi
DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- CFLAGS="-O3 -Wall -Wextra -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
+ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char ${ieefp}"
# PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
- PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
+ PROFILE="-Wall -Wextra -pg -g -O3 -ffast-math ${ieefp} -D_REENTRANT -fsigned-char -fno-inline"
# glibc < 2.1.3 has a serious FP bug in the math inline header
# that will cripple Vorbis. Look to see if the magic FP stack
--
2.17.0
@@ -0,0 +1,19 @@
SUMMARY = "Ogg Vorbis Audio Codec"
DESCRIPTION = "Ogg Vorbis is a high-quality lossy audio codec \
that is free of intellectual property restrictions. libvorbis \
is the main vorbis codec library."
HOMEPAGE = "https://xiph.org/vorbis/"
BUGTRACKER = "https://gitlab.xiph.org/xiph/vorbis/-/issues"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=73d9c8942c60b846c3bad13cc6c2e520 \
file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=c95a4ac2b4125f00a9acf61449ebb843"
DEPENDS = "libogg"
SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.xz \
file://0001-configure-Check-for-clang.patch \
"
SRC_URI[md5sum] = "50902641d358135f06a8392e61c9ac77"
SRC_URI[sha256sum] = "b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b"
inherit autotools pkgconfig
@@ -0,0 +1,156 @@
From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001
From: Jan Schmidt <thaytan@noraisin.net>
Date: Sun, 10 Nov 2013 00:49:52 +1100
Subject: [PATCH] Import revision 1206 from upstream to fix PIE build.
Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm
in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad
for shared libraries. Some environments demand that .text actually be
read-only all the time, yet MC_put_o_16_arm etc require that the addresses
be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.)
Even in those environments which permit the dynamic linker to modify the
.text segment, the runtime cost of doing the relocation can be noticeable.
This commit rewrites the linkage, discarding the tables of addresses
in favor of tables of offsets. All transfers are local within each individual
function, so there can be no interference by processing that occurs
after assembly, such as link-time re-ordering (even of individual functions.)
Patch by John Reiser <jreiser@bitwagon.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499]
---
libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++-------------------
1 file changed, 33 insertions(+), 37 deletions(-)
diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
index c921f7c..82143f8 100644
--- a/libmpeg2/motion_comp_arm_s.S
+++ b/libmpeg2/motion_comp_arm_s.S
@@ -30,9 +30,13 @@ MC_put_o_16_arm:
pld [r1]
stmfd sp!, {r4-r11, lr} @ R14 is also called LR
and r4, r1, #3
- adr r5, MC_put_o_16_arm_align_jt
- add r5, r5, r4, lsl #2
- ldr pc, [r5]
+ ldrb r4, [pc, r4]
+ add pc, pc, r4, lsl #2
+ .byte (MC_put_o_16_arm_align0 - 0f)>>2
+ .byte (MC_put_o_16_arm_align1 - 0f)>>2
+ .byte (MC_put_o_16_arm_align2 - 0f)>>2
+ .byte (MC_put_o_16_arm_align3 - 0f)>>2
+0:
MC_put_o_16_arm_align0:
ldmia r1, {r4-r7}
@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3:
1: PROC(24)
bne 1b
ldmfd sp!, {r4-r11, pc} @@ update PC with LR content.
-MC_put_o_16_arm_align_jt:
- .word MC_put_o_16_arm_align0
- .word MC_put_o_16_arm_align1
- .word MC_put_o_16_arm_align2
- .word MC_put_o_16_arm_align3
@ ----------------------------------------------------------------
.align
@@ -91,9 +90,14 @@ MC_put_o_8_arm:
pld [r1]
stmfd sp!, {r4-r10, lr} @ R14 is also called LR
and r4, r1, #3
- adr r5, MC_put_o_8_arm_align_jt
- add r5, r5, r4, lsl #2
- ldr pc, [r5]
+ ldrb r4, [pc, r4]
+ add pc, pc, r4, lsl #2
+ .byte (MC_put_o_8_arm_align0 - 0f)>>2
+ .byte (MC_put_o_8_arm_align1 - 0f)>>2
+ .byte (MC_put_o_8_arm_align2 - 0f)>>2
+ .byte (MC_put_o_8_arm_align3 - 0f)>>2
+0:
+
MC_put_o_8_arm_align0:
ldmia r1, {r4-r5}
add r1, r1, r2
@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3:
bne 1b
ldmfd sp!, {r4-r10, pc} @@ update PC with LR content.
-MC_put_o_8_arm_align_jt:
- .word MC_put_o_8_arm_align0
- .word MC_put_o_8_arm_align1
- .word MC_put_o_8_arm_align2
- .word MC_put_o_8_arm_align3
-
@ ----------------------------------------------------------------
.macro AVG_PW rW1, rW2
mov \rW2, \rW2, lsl #24
@@ -160,12 +158,17 @@ MC_put_x_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ ldr r11, 0f
and r4, r1, #3
- adr r5, MC_put_x_16_arm_align_jt
- ldr r11, [r5]
mvn r12, r11
- add r5, r5, r4, lsl #2
- ldr pc, [r5, #4]
+ ldrb r4, [pc, r4]
+ add pc, pc, r4, lsl #2
+ .byte (MC_put_x_16_arm_align0 - 0f)>>2
+ .byte (MC_put_x_16_arm_align1 - 0f)>>2
+ .byte (MC_put_x_16_arm_align2 - 0f)>>2
+ .byte (MC_put_x_16_arm_align3 - 0f)>>2
+0:
+ .word 0x01010101
.macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4
mov \R0, \R0, lsr #(\shift)
@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3:
add r0, r0, r2
bne 1b
ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
-MC_put_x_16_arm_align_jt:
- .word 0x01010101
- .word MC_put_x_16_arm_align0
- .word MC_put_x_16_arm_align1
- .word MC_put_x_16_arm_align2
- .word MC_put_x_16_arm_align3
@ ----------------------------------------------------------------
.align
@@ -253,12 +250,17 @@ MC_put_x_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
stmfd sp!, {r4-r11,lr} @ R14 is also called LR
+ ldr r11, 0f
and r4, r1, #3
- adr r5, MC_put_x_8_arm_align_jt
- ldr r11, [r5]
mvn r12, r11
- add r5, r5, r4, lsl #2
- ldr pc, [r5, #4]
+ ldrb r4, [pc, r4]
+ add pc, pc, r4, lsl #2
+ .byte (MC_put_x_8_arm_align0 - 0f)>>2
+ .byte (MC_put_x_8_arm_align1 - 0f)>>2
+ .byte (MC_put_x_8_arm_align2 - 0f)>>2
+ .byte (MC_put_x_8_arm_align3 - 0f)>>2
+0:
+ .word 0x01010101
.macro ADJ_ALIGN_DW shift, R0, R1, R2
mov \R0, \R0, lsr #(\shift)
@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3:
add r0, r0, r2
bne 1b
ldmfd sp!, {r4-r11,pc} @@ update PC with LR content.
-MC_put_x_8_arm_align_jt:
- .word 0x01010101
- .word MC_put_x_8_arm_align0
- .word MC_put_x_8_arm_align1
- .word MC_put_x_8_arm_align2
- .word MC_put_x_8_arm_align3
@@ -0,0 +1,55 @@
From cbcff58ed670c8edc0be1004384cbe0fd07d8d26 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 5 Jul 2017 18:49:21 -0700
Subject: [PATCH 1/2] check for available arm optimizations
Taken From
http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/65_arm-test-with-compiler.patch/
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index acdcb1e..2c0a721 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ elif test x"$GCC" = x"yes"; then
AC_TRY_CFLAGS([$TRY_CFLAGS $CFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
dnl arch-specific flags
- arm_conditional=false
+ build_arm_opt=false
case "$host" in
i?86-* | k?-* | x86_64-* | amd64-*)
AC_DEFINE([ARCH_X86],,[x86 architecture])
@@ -102,8 +102,12 @@ elif test x"$GCC" = x"yes"; then
alpha*)
AC_DEFINE([ARCH_ALPHA],,[alpha architecture]);;
arm*)
- arm_conditional=:
- AC_DEFINE([ARCH_ARM],,[ARM architecture]);;
+ AC_LANG(C)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ void foo(void) { __asm__ volatile("pld [r1]"); }]])],
+ build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]),
+ build_arm_opt=false);;
esac
elif test x"$CC" = x"tendracc"; then
dnl TenDRA portability checking compiler
@@ -123,7 +127,7 @@ else
esac
fi
-AM_CONDITIONAL(ARCH_ARM, ${arm_conditional})
+AM_CONDITIONAL(ARCH_ARM, test x$build_arm_opt = xtrue)
dnl Checks for libtool - this must be done after we set cflags
AC_LIBTOOL_WIN32_DLL
--
2.13.2
@@ -0,0 +1,63 @@
From f9d9dc92d75f8910e3cd5fdcbea72e505cdf3493 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 5 Jul 2017 19:03:36 -0700
Subject: [PATCH 2/2] Set visibility of global symbols used in ARM specific
assembly file to internal
Taken from
http://sources.debian.net/src/mpeg2dec/0.5.1-7/debian/patches/60_arm-private-symbols.patch/
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libmpeg2/motion_comp_arm_s.S | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S
index f6c3d7d..c921f7c 100644
--- a/libmpeg2/motion_comp_arm_s.S
+++ b/libmpeg2/motion_comp_arm_s.S
@@ -23,7 +23,8 @@
@ ----------------------------------------------------------------
.align
- .global MC_put_o_16_arm
+ .global MC_put_o_16_arm
+ .internal MC_put_o_16_arm
MC_put_o_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -83,7 +84,8 @@ MC_put_o_16_arm_align_jt:
@ ----------------------------------------------------------------
.align
- .global MC_put_o_8_arm
+ .global MC_put_o_8_arm
+ .internal MC_put_o_8_arm
MC_put_o_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -152,7 +154,8 @@ MC_put_o_8_arm_align_jt:
.endm
.align
- .global MC_put_x_16_arm
+ .global MC_put_x_16_arm
+ .internal MC_put_x_16_arm
MC_put_x_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
@@ -244,7 +247,8 @@ MC_put_x_16_arm_align_jt:
@ ----------------------------------------------------------------
.align
- .global MC_put_x_8_arm
+ .global MC_put_x_8_arm
+ .internal MC_put_x_8_arm
MC_put_x_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
pld [r1]
--
2.13.2
@@ -0,0 +1,70 @@
Rewrite the public symbol check to verify the shared libraries, to check for
more things, and to avoid duplication; fixes make check on ARM
Taken From
https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
test/globals | 42 +++++++++++++++++++++++++++---------------
1 file changed, 27 insertions(+), 15 deletions(-)
--- mpeg2dec.orig/test/globals
+++ mpeg2dec/test/globals
@@ -1,4 +1,8 @@
#!/bin/sh
+# TODO
+# - fix checking of .a libs; problem is that "nm -g --defined-only" lists
+# internal symbols; this can be solved by using objdump, but it's probably
+# good enough to just run the tests on the shared lib
if test x"$srcdir" != x""; then
builddir="." # running from make check, but it does not define that
@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd`
error=0
-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\
- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'`
-
-if test x"$bad_globals" != x""; then
- echo BAD GLOBAL SYMBOLS:
- for s in $bad_globals; do echo $s; done
+# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...]
+#
+# checks public symbols in shared libs:
+# - allow prefix_anything
+# - reject _prefixanything
+# - allow _anything
+# - reject anything else
+#
+# NB: skips missing files
+check_bad_public_symbols() {
+ symbols_prefix="$1"
+ shift
+ lib_files=`ls "$@" 2>/dev/null`
+ [ -z "$lib_files" ] && return
+ bad_globals=`nm -g --defined-only $lib_files |
+ awk '{if ($3) print $3}' |
+ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"`
+ [ -z "$bad_globals" ] && return
error=1
-fi
-
-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\
- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'`
+ echo BAD GLOBAL SYMBOLS in $lib_files:
+ echo "$bad_globals"
+}
-if test x"$bad_globals" != x""; then
- echo BAD GLOBAL SYMBOLS:
- for s in $bad_globals; do echo $s; done
- error=1
-fi
+check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so
+check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so
exit $error
@@ -0,0 +1,43 @@
Add new method to judge whether <altivec.h> is needed
The original logic will use "typedef vector int t;" to judge
whether <altivec.h> is needed. altivec.h contains the following
statement:
#if !defined(__APPLE_ALTIVEC__)
#define vector __vector
#define pixel __pixel
#define bool
#endif
In gcc-4.3.3, __APPLE_ALTIVEC__ is not defined by compiler, neither
as vector, pixel, and bool. In order to make "typedef vector int t;"
pass the compilation, we need to include altivec.h.
However in gcc-4.5.0, __APPLE_ALTIVEC__ is defined by compiler,
so as vector, pixel, and bool. We could not judge whether
altivec.h is needed by "typedef vector int t;".
Here we include another statement "int tmp = __CR6_EQ;", in
which __CR6_EQ is defined in altivec.h.
Upstream-Status: Pending
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
diff -ruN a/configure.in b/configure.in
--- a/configure.ac 2010-09-14 20:55:42.399687663 +0800
+++ b/configure.ac 2010-09-14 20:56:43.403204648 +0800
@@ -79,11 +79,11 @@
CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS"
AC_MSG_CHECKING([if <altivec.h> is needed])
AC_TRY_COMPILE([],
- [typedef vector int t;
+ [typedef vector int t; int tmp = __CR6_EQ;
vec_ld(0, (unsigned char *)0);],
[have_altivec=yes; AC_MSG_RESULT(no)],
[AC_TRY_COMPILE([#include <altivec.h>],
- [typedef vector int t; vec_ld(0, (unsigned char *)0);],
+ [typedef vector int t; int tmp = __CR6_EQ; vec_ld(0, (unsigned char *)0);],
[AC_DEFINE([HAVE_ALTIVEC_H],,
[Define to 1 if you have the <altivec.h> header.])
have_altivec=yes; AC_MSG_RESULT(yes)],
@@ -0,0 +1,51 @@
SUMMARY = "Library and test program for decoding MPEG-2 and MPEG-1 video streams"
DESCRIPTION = "mpeg2dec is a test program for libmpeg2. It decodes \
mpeg-1 and mpeg-2 video streams, and also includes a demultiplexer \
for mpeg-1 and mpeg-2 program streams. The main purpose of mpeg2dec \
is to have a simple test bed for libmpeg2."
HOMEPAGE = "https://libmpeg2.sourceforge.io/"
SECTION = "libs"
LICENSE = "GPL-2.0-or-later"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
file://include/mpeg2.h;beginline=1;endline=22;md5=7766f4fcb58f0f8413c49a746f2ab89b"
SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \
file://altivec_h_needed.patch \
file://0001-check-for-available-arm-optimizations.patch \
file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \
file://61_global-symbol-test.patch \
file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \
"
S = "${WORKDIR}/libmpeg2-${PV}"
SRC_URI[md5sum] = "0f92c7454e58379b4a5a378485bbd8ef"
SRC_URI[sha256sum] = "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
inherit autotools pkgconfig
EXTRA_OECONF = "--enable-shared --disable-sdl"
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--with-x,--without-x,virtual/libx11 libxext libxv"
PACKAGES = "mpeg2dec-dbg mpeg2dec mpeg2dec-doc libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev libmpeg2-staticdev libmpeg2convert-staticdev"
FILES:${PN} = "${bindir}/*"
FILES:libmpeg2 = "${libdir}/libmpeg2.so.*"
FILES:libmpeg2convert = "${libdir}/libmpeg2convert.so.*"
FILES:libmpeg2-dev = "${libdir}/libmpeg2.so \
${libdir}/libmpeg2.la \
${libdir}/libmpeg2arch.la \
${libdir}/pkgconfig/libmpeg2.pc \
${includedir}/mpeg2dec/mpeg2.h"
FILES:libmpeg2-staticdev = "${libdir}/libmpeg2.a"
FILES:libmpeg2convert-dev = "${libdir}/libmpeg2convert.so \
${libdir}/libmpeg2convert.la \
${libdir}/libmpeg2convertarch.la \
${libdir}/pkgconfig/libmpeg2convert.pc \
${includedir}/mpeg2dec/mpeg2convert.h"
FILES:libmpeg2convert-staticdev = "${libdir}/libmpeg2convert.a"
@@ -0,0 +1,56 @@
SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3"
DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \
mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \
and also can write the decoded audio to WAV."
HOMEPAGE = "http://mpg123.de/"
BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/"
SECTION = "multimedia"
LICENSE = "LGPL-2.1-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169"
SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2"
SRC_URI[sha256sum] = "1ca77d3a69a5ff845b7a0536f783fee554e1041139a6b978f6afe14f5814ad1a"
UPSTREAM_CHECK_REGEX = "mpg123-(?P<pver>\d+(\.\d+)+)\.tar"
inherit autotools pkgconfig
# The options should be mutually exclusive for configuration script.
# If both alsa and pulseaudio are specified (as in the default distro features)
# pulseaudio takes precedence.
PACKAGECONFIG_ALSA = "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}"
PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib"
PACKAGECONFIG[esd] = ",,esound"
PACKAGECONFIG[jack] = ",,jack"
PACKAGECONFIG[openal] = ",,openal-soft"
PACKAGECONFIG[portaudio] = ",,portaudio-v19"
PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio"
PACKAGECONFIG[sdl] = ",,libsdl2"
# Following are possible sound output modules:
# alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi
AUDIOMODS += "${@bb.utils.filter('PACKAGECONFIG', 'alsa esd jack openal portaudio sdl', d)}"
AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}"
CACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no"
EXTRA_OECONF = " \
--enable-shared \
--enable-largefile \
--disable-lfs-alias \
--with-audio='${AUDIOMODS}' \
${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \
${@bb.utils.contains('TARGET_FPU', 'soft', '--with-cpu=generic_nofpu', '', d)} \
"
# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4'
#| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24'
#...
#| make[3]: *** [equalizer.lo] Error 1
ARM_INSTRUCTION_SET:armv4 = "arm"
ARM_INSTRUCTION_SET:armv5 = "arm"
@@ -0,0 +1,283 @@
SUMMARY = "Sound server for Linux and Unix-like operating systems"
DESCRIPTION = "A general purpose sound server intended to run as a middleware \
between your applications and your hardware devices, either using ALSA or OSS."
HOMEPAGE = "http://www.pulseaudio.org"
AUTHOR = "Lennart Poettering"
SECTION = "libs/multimedia"
# Most of PulseAudio code is under LGPL-2.1-or-later. There are a few
# exceptions:
#
# The "adrian" echo canceller variant has code under a non-standard permissive
# license. See src/modules/echo-cancel/adrian-license.txt for details. This
# recipe disables the adrian echo canceller to avoid hassle with the unusual
# license.
#
# The src/modules/reserve* and src/pulsecore/rtkit* files are under the MIT
# license.
#
# The src/pulsecore/filter/ directory contains code under the 3-clause BSD
# license.
#
# People who distribute PulseAudio binaries need to also consider that there
# are some dependencies to GPL libraries. LGPL code that depends on GPL
# libraries probably becomes effectively GPL-licensed (at compile-time? or at
# at link-time?). I'm not a lawyer, though, so I'm not sure of the exact
# implications. The GPL dependencies only affect the server, not the client
# library, with the exception of libdbus that affects both. These are the GPL
# library dependencies:
#
# One of the resampler implementations uses libsamplerate. This recipe doesn't
# enable that resampler, however.
#
# One of the database implementations uses gdbm. This recipe doesn't enable
# that database implementation, however.
#
# module-lirc (enabled by PACKAGECONFIG[lirc]) uses LIRC.
#
# module-equalizer-sink uses FFTW. This recipe disables that, however.
#
# The dependency with the most complicated licensing considerations is libdbus.
# When PACKAGECONFIG[dbus] is enabled (like it is by default), libdbus will be
# used by both the server and the client library (libpulse). Does this affect
# applications that use libpulse? It should also be noted that libdbus is
# dual-licensed: either GPL-2.0-or-later or AFL-2.0 terms apply. Whose decision
# is it which of the licenses apply? What a mess. Some people hold the view that
# libdbus is a system library that is covered by the "special exception" in
# GPLv2's section 3, and therefore libdbus's GPL license doesn't affect
# PulseAudio.
LICENSE = "LGPL-2.1-or-later & MIT & BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \
file://GPL;md5=4325afd396febcb659c36b49533135d4 \
file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
file://src/modules/echo-cancel/adrian-license.txt;md5=abbab006a561fbffccedf1c3531f34ab \
file://src/pulsecore/filter/LICENSE.WEBKIT;md5=49defbaffddf8c51faf606ff7fc3b1f7 \
file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84 \
file://src/modules/reserve.h;beginline=6;endline=28;md5=0e23094760367d51b6609750e9b31fbb \
file://src/pulsecore/rtkit.h;beginline=6;endline=29;md5=3f00ff966716ae0817c31576d1473528 \
file://src/modules/echo-cancel/adrian-aec.h;beginline=3;endline=12;md5=d3ed4fad1c073f8b06f37495dc5d1026 \
file://src/pulsecore/filter/biquad.h;beginline=1;endline=4;md5=6d46d1365206528a20137355924233c1 \
"
# libtool is needed for libltdl, used in module loading.
DEPENDS = "m4-native libatomic-ops libsndfile1 libtool"
# optional
DEPENDS += "udev alsa-lib glib-2.0"
DEPENDS += "speexdsp libxml-parser-perl-native libcap"
inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpages gsettings
# *.desktop rules wont be generated during configure and build will fail
# if using --disable-nls
USE_NLS = "yes"
EXTRA_OEMESON = "\
-Dhal-compat=false \
-Dorc=disabled \
-Daccess_group=audio \
-Dopenssl=disabled \
-Ddatabase=simple \
-Dzshcompletiondir=no \
-Dudevrulesdir=`pkg-config --variable=udevdir udev`/rules.d \
-Dvalgrind=disabled \
-Dtests=false \
-Drunning-from-build-tree=false \
"
# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now.
EXTRA_OEMESON += "-Dsoxr=disabled"
# The FFTW dependency (for module-equalizer-sink) was removed in commit
# ddbd713293 without explaining why it was not made a PACKAGECONFIG item
# instead. Oh well, let's keep it disabled until someone expresses some
# interest in having it enabled.
EXTRA_OEMESON += "-Dfftw=disabled"
# The "adrian" echo canceller implementation has a non-standard license
# (src/modules/echo-cancel/adrian-license.txt). It's a permissive license, so
# the licensing terms are probably not problematic, but it would be an extra
# hassle to add the license to OE-Core's set of licenses. The canceller isn't
# very good anyway, better alternatives exist (such as the webrtc canceller).
EXTRA_OEMESON += "-Dadrian-aec=false"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \
dbus gsettings \
"
PACKAGECONFIG[dbus] = "-Ddbus=enabled,-Ddbus=disabled,dbus"
PACKAGECONFIG[bluez5] = "-Dbluez5=enabled,-Dbluez5=disabled,bluez5 sbc"
PACKAGECONFIG[gsettings] = "-Dgsettings=enabled,-Dgsettings=disabled,glib-2.0-native glib-2.0"
PACKAGECONFIG[ofono] = "-Dbluez5-ofono-headset=true,-Dbluez5-ofono-headset=false,ofono"
PACKAGECONFIG[gtk] = "-Dgtk=enabled,-Dgtk=disabled,gtk+3"
PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemduserunitdir=${systemd_user_unitdir},-Dsystemd=disabled,systemd"
PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libxtst libice libsm libxcb"
PACKAGECONFIG[avahi] = "-Davahi=enabled,-Davahi=disabled,avahi"
PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
# Since many embedded systems don't have non-root users, it's useful to be
# able to use pulseaudio autospawn for root as well.
PACKAGECONFIG[autospawn-for-root] = ",,,"
PACKAGECONFIG[lirc] = "-Dlirc=enabled,-Dlirc=disabled,lirc"
PACKAGECONFIG[webrtc] = "-Dwebrtc-aec=enabled,-Dwebrtc-aec=disabled,webrtc-audio-processing"
PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false,"
PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,"
export TARGET_PFPU = "${TARGET_FPU}"
set_cfg_value () {
sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1"
if ! grep -q "^$2 = $3\$" "$1"; then
die "Use of sed to set '$2' to '$3' in '$1' failed"
fi
}
do_compile:append () {
if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
set_cfg_value src/pulse/client.conf allow-autospawn-for-root yes
fi
}
do_install:append() {
install -d ${D}${sysconfdir}/default/volatiles
install -m 0644 ${WORKDIR}/volatiles.04_pulse ${D}${sysconfdir}/default/volatiles/04_pulse
}
USERADD_PACKAGES = "pulseaudio-server"
GROUPADD_PARAM:pulseaudio-server = "--system pulse"
USERADD_PARAM:pulseaudio-server = "--system --home /var/run/pulse \
--no-create-home --shell /bin/false \
--groups audio,pulse --gid pulse pulse"
PACKAGES =+ "\
libpulse \
libpulse-mainloop-glib \
libpulse-simple \
libpulsecommon \
libpulsecore \
${PN}-pa-info \
${PN}-server \
${PN}-misc \
"
# 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 =+ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}"
#upgrade path:
RREPLACES:pulseaudio-server = "libpulse-bin libpulse-conf"
PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
FILES:libpulsecore = "${libdir}/pulseaudio/libpulsecore*.so"
FILES:libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
# client.conf configures the behaviour of libpulse, so it belongs in the same
# package.
FILES:libpulse = "${libdir}/libpulse.so.* ${sysconfdir}/pulse/client.conf"
FILES:libpulse-simple = "${libdir}/libpulse-simple.so.*"
FILES:libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
FILES:${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala"
FILES:${PN}-bin += "${sysconfdir}/default/volatiles/04_pulse"
FILES:${PN}-pa-info = "${bindir}/pa-info"
FILES:${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*"
#SYSTEMD_PACKAGES = "${PN}-server"
SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service"
FILES:${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so"
# Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it)
FILES:${PN} = ""
ALLOW_EMPTY:${PN} = "1"
CONFFILES:libpulse = "${sysconfdir}/pulse/client.conf"
CONFFILES:pulseaudio-server = "\
${sysconfdir}/pulse/default.pa \
${sysconfdir}/pulse/daemon.conf \
${sysconfdir}/pulse/system.pa \
"
pkg_postinst:${PN}-server() {
if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
}
python populate_packages:prepend() {
plugindir = d.expand('${libdir}/pulseaudio/modules/')
do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True)
do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True)
}
# pa-info is a bash script that collects information about the audio setup.
# It's primarily useful for attaching an information dump when reporting bugs.
RDEPENDS:${PN}-pa-info = "\
alsa-utils-amixer \
alsa-utils-aplay \
alsa-utils-scripts \
bash \
${PN}-server \
"
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 \
pulseaudio-module-role-cork \
pulseaudio-module-switch-on-port-available"
# If the server is installed, it's usually desirable to make ALSA applications
# use PulseAudio. alsa-plugins-pulseaudio-conf will install the configuration
# that makes the PulseAudio plugin the default ALSA device.
RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
# pulseaudio-module-console-kit is built whenever dbus is enabled by PACKAGECONFIG
# but consolekit depends on libx11 and is available only for DISTRO with x11 in DISTRO_FEATURES
RDEPENDS:pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}"
RDEPENDS:pulseaudio-misc += "pulseaudio-module-cli-protocol-unix"
FILES:${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer"
GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', '${PN}-module-gsettings', '', d)}"
FILES:${PN}-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas"
# The console-kit module is good to have on X11 systems (it keeps PulseAudio
# running for the duration of the user login session). The device-manager and
# x11-* modules are referenced from the start-pulseaudio-x11 script, so those
# modules must be installed when X11 is enabled.
RDEPENDS:pulseaudio-server += "\
${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\
pulseaudio-module-device-manager \
pulseaudio-module-x11-cork-request \
pulseaudio-module-x11-publish \
pulseaudio-module-x11-xsmp \
', '', d)}"
RDEPENDS:pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \
bb.utils.contains('DISTRO_FEATURES', 'systemd', 'pulseaudio-module-systemd-login', 'pulseaudio-module-console-kit', d), \
'', d)}"
@@ -0,0 +1,97 @@
From babec3a50dd710d26b72f6c6d43bd79b04e954a6 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Date: Tue, 28 Apr 2015 14:32:43 +0300
Subject: [PATCH] client-conf: Add allow-autospawn-for-root
Usually autospawning for root is a bad idea, since it can easily
interfere with other users' PulseAudio instances, but in embedded
environments where only root exists, autospawning is fine.
Upstream-Status: Denied [Upstream hasn't so far been convinced that
this feature is needed. The view is that running the graphical session
as root doesn't make sense even on embedded systems, or if it does,
running PulseAudio in the system mode should be a good solution for
that use case. If someone can prove otherwise, the patch would
probably be accepted.]
Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
---
man/pulse-client.conf.5.xml.in | 9 +++++++++
src/pulse/client-conf.c | 1 +
src/pulse/client-conf.h | 1 +
src/pulse/client.conf.in | 1 +
src/pulse/context.c | 2 +-
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/man/pulse-client.conf.5.xml.in b/man/pulse-client.conf.5.xml.in
index b88898c..e737c96 100644
--- a/man/pulse-client.conf.5.xml.in
+++ b/man/pulse-client.conf.5.xml.in
@@ -82,6 +82,15 @@ License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
</option>
<option>
+ <p><opt>allow-autospawn-for-root=</opt> Allow autospawning also for root.
+ Takes a boolean value, defaults to <opt>no</opt>. If the <opt>autospawn
+ </opt> option is disabled, this option has no effect. Autospawning for
+ root is disabled by default, because running PulseAudio as root will
+ interfere with regular users' PulseAudio instances. This option should be
+ enabled only in environments where there are no regular users at all.</p>
+ </option>
+
+ <option>
<p><opt>daemon-binary=</opt> Path to the PulseAudio daemon to
run when autospawning. Defaults to a path configured at compile
time.</p>
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index a3c9486..9f68ee5 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -138,6 +138,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e
{ "default-server", pa_config_parse_string, &c->default_server, NULL },
{ "default-dbus-server", pa_config_parse_string, &c->default_dbus_server, NULL },
{ "autospawn", pa_config_parse_bool, &c->autospawn, NULL },
+ { "allow-autospawn-for-root", pa_config_parse_bool, &c->allow_autospawn_for_root, NULL },
{ "cookie-file", pa_config_parse_string, &c->cookie_file_from_client_conf, NULL },
{ "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL },
{ "enable-shm", pa_config_parse_not_bool, &c->disable_shm, NULL },
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
index 7691ec7..19db7ed 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -38,6 +38,7 @@ typedef struct pa_client_conf {
char *cookie_file_from_application;
char *cookie_file_from_client_conf;
bool autospawn, disable_shm, disable_memfd, auto_connect_localhost, auto_connect_display;
+ bool allow_autospawn_for_root;
size_t shm_size;
} pa_client_conf;
diff --git a/src/pulse/client.conf.in b/src/pulse/client.conf.in
index 26b7790..69830ef 100644
--- a/src/pulse/client.conf.in
+++ b/src/pulse/client.conf.in
@@ -23,6 +23,7 @@
; default-dbus-server =
; autospawn = yes
+; allow-autospawn-for-root = no
; daemon-binary = @PA_BINARY@
; extra-arguments = --log-target=syslog
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 69be5f4..d6e13e8 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -1027,7 +1027,7 @@ int pa_context_connect(
if (!(flags & PA_CONTEXT_NOAUTOSPAWN) && c->conf->autospawn) {
#ifdef HAVE_GETUID
- if (getuid() == 0)
+ if (!c->conf->allow_autospawn_for_root && getuid() == 0)
pa_log_debug("Not doing autospawn since we are root.");
else {
c->do_autospawn = true;
--
2.8.1
@@ -0,0 +1,26 @@
From 4ee244d0824e772ab35abb0f9df5e8088e16fc5d Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Mon, 26 Apr 2021 19:30:40 +0200
Subject: [PATCH] doxygen/meson.build: remove dependency on doxygen binary
New meson refuses to complete confuguration if doxygen is absent
even if this target is never actually run. As we never run it,
let's remove it, until upstream and/or meson figure out that it's
optional and should be treated as such.
Upstream-Status: Inappropriate [needs proper upstream fix]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
doxygen/meson.build | 2 --
1 file changed, 2 deletions(-)
diff --git a/doxygen/meson.build b/doxygen/meson.build
index afc0e49..df55c83 100644
--- a/doxygen/meson.build
+++ b/doxygen/meson.build
@@ -6,5 +6,3 @@ doxygen_conf = configure_file(
configuration : cdata,
)
-run_target('doxygen',
- command : ['doxygen', doxygen_conf])
@@ -0,0 +1,30 @@
From f0ddd7c36556ad05c1398fdd132947323ad26473 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 6 Dec 2018 11:43:41 +0800
Subject: [PATCH 2/2] do not display CLFAGS to improve reproducibility build
Macro PA_CFLAGS contains build path, do not use it to
display CFLAGS which could improve reproducibility build.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
src/daemon/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/daemon/main.c b/src/daemon/main.c
index 30ef499..5c3abf0 100644
--- a/src/daemon/main.c
+++ b/src/daemon/main.c
@@ -916,7 +916,7 @@ int main(int argc, char *argv[]) {
pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
pa_log_info("This is PulseAudio %s", PACKAGE_VERSION);
- pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS);
+ pa_log_debug("Compilation CFLAGS: ***");
#ifdef HAVE_LIBSAMPLERATE
pa_log_warn("Compiled with DEPRECATED libsamplerate support!");
--
2.25.1
@@ -0,0 +1,2 @@
# <type> <owner> <group> <mode> <path> <linksource>
d pulse pulse 0755 /var/run/pulse none
@@ -0,0 +1,10 @@
require pulseaudio.inc
SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
file://0001-client-conf-Add-allow-autospawn-for-root.patch \
file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \
file://volatiles.04_pulse \
file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \
"
SRC_URI[sha256sum] = "8eef32ce91d47979f95fd9a935e738cd7eb7463430dabc72863251751e504ae4"
UPSTREAM_CHECK_REGEX = "pulseaudio-(?P<pver>\d+(\.(?!99)\d+)+)\.tar"
@@ -0,0 +1,22 @@
SUMMARY = "SBC Audio Codec"
DESCRIPTION = "Bluetooth low-complexity, subband codec (SBC) library."
HOMEPAGE = "https://www.bluez.org"
SECTION = "libs"
LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
LICENSE:${PN} = "LGPL-2.1-or-later"
LICENSE:${PN}-examples = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \
file://src/sbcenc.c;beginline=1;endline=24;md5=08e7a70b127f4100ff2cd7d629147d8d \
file://sbc/sbc.h;beginline=1;endline=26;md5=0f57d0df22b0d40746bdd29805a4361b"
DEPENDS = "libsndfile1"
SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz"
SRC_URI[sha256sum] = "8f12368e1dbbf55e14536520473cfb338c84b392939cc9b64298360fd4a07992"
inherit autotools pkgconfig
PACKAGES =+ "${PN}-examples"
FILES:${PN}-examples += "${bindir}/*"
@@ -0,0 +1,20 @@
SUMMARY = "Speech Audio Codec"
DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
HOMEPAGE = "http://www.speex.org"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a \
file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50 \
"
DEPENDS = "libogg speexdsp"
SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz"
UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar"
SRC_URI[sha256sum] = "4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea"
inherit autotools pkgconfig lib_package
EXTRA_OECONF = "\
${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api --disable-vbr', '', d)} \
"
@@ -0,0 +1,26 @@
SUMMARY = "A patent-free DSP library"
DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library."
HOMEPAGE = "http://www.speex.org"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a"
SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz"
UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar"
SRC_URI[sha256sum] = "8c777343e4a6399569c72abc38a95b24db56882c83dbdb6c6424a5f4aeb54d3d"
inherit autotools pkgconfig
EXTRA_OECONF = "\
--disable-examples \
${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \
"
# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't
# be installed together with speexdsp, since they contain overlapping files.
RCONFLICTS:${PN} = "speex (< 1.2rc2)"
RCONFLICTS:${PN}-dbg = "speex-dbg (< 1.2rc2)"
RCONFLICTS:${PN}-dev = "speex-dev (< 1.2rc2)"
RCONFLICTS:${PN}-staticdev = "speex-staticdev (< 1.2rc2)"
@@ -0,0 +1,57 @@
SUMMARY = "WebP is an image format designed for the Web"
DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
used on a large variety of photographic, translucent and \
graphical images found on the web. The degree of lossy \
compression is adjustable so a user can choose the trade-off \
between file size and image quality. WebP typically achieves \
an average of 30% more compression than JPEG and JPEG 2000, \
without loss of image quality."
HOMEPAGE = "https://developers.google.com/speed/webp/"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
SRC_URI[sha256sum] = "b3779627c2dfd31e3d8c4485962c2efe17785ef975e2be5c8c0c9e6cd3c4ef66"
UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
EXTRA_OECONF = " \
--disable-wic \
--enable-libwebpmux \
--enable-libwebpdemux \
--enable-threading \
"
# Do not trust configure to determine if neon is available.
#
EXTRA_OECONF_ARM = " \
${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \
"
EXTRA_OECONF:append:arm = " ${EXTRA_OECONF_ARM}"
EXTRA_OECONF:append:armeb = " ${EXTRA_OECONF_ARM}"
inherit autotools lib_package
PACKAGECONFIG ??= ""
# libwebpdecoder is a subset of libwebp, don't build it unless requested
PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
# Apply for examples programs: cwebp and dwebp
PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
# Apply only for example program vwebp
PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
PACKAGES =+ "${PN}-gif2webp"
DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
FILES:${PN}-gif2webp = "${bindir}/gif2webp"
BBCLASSEXTEND += "native nativesdk"
@@ -0,0 +1,51 @@
From 7bc25f4d1aaa5186d2eff3e2326c7245fcd7e7f3 Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Tue, 13 Dec 2016 14:22:32 -0700
Subject: [PATCH] Fix X32 build by disabling asm
This applies gentoo's x32 patch, adjusted slightly, which disables asm support
for x32 as well as correcting -m.
Debian has a different patch which does the same, and there's a superior yet
out of date patch series on the x264 list which keeps asm support enabled, but
doesn't successfully build at this time, and my assembly is very rusty.
Upstream-Status: Pending
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
configure | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 51b128d..6ea9469 100755
--- a/configure
+++ b/configure
@@ -754,7 +754,13 @@ case $host_cpu in
AS_EXT=".asm"
ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
stack_alignment=16
- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+ if [ $compiler = GNU ]; then
+ if cpp_check "" "" "__ILP32__" ; then
+ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
+ else
+ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
+ fi
+ fi
if [ "$SYS" = MACOSX ]; then
ASFLAGS="$ASFLAGS -f macho64 -DPREFIX"
if cc_check '' "-arch x86_64"; then
@@ -773,7 +779,11 @@ case $host_cpu in
RCFLAGS="--target=pe-x86-64 $RCFLAGS"
fi
else
- ASFLAGS="$ASFLAGS -f elf64"
+ if cpp_check "" "" "__ILP32__" ; then
+ asm=no
+ else
+ ASFLAGS="$ASFLAGS -f elf64"
+ fi
fi
;;
powerpc*)
@@ -0,0 +1,33 @@
From a72bf499a0674fc75eedf15008b424e28f67e4bd Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei@gherzan.ro>
Date: Fri, 2 Feb 2018 15:10:08 +0200
Subject: [PATCH] dont default to cortex-a9 with neon
-march flag is not in CFLAGS so this will always default to
-mcpu=cortex-a8 -mfpu=neon.
Upstream-Status: Pending
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
---
configure | 3 ---
1 file changed, 3 deletions(-)
diff --git a/configure b/configure
index 0e3ef23..955b993 100755
--- a/configure
+++ b/configure
@@ -911,9 +911,6 @@ if [ $asm = auto -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
fi
if [ $asm = auto -a $ARCH = ARM ] ; then
- # set flags so neon is built by default
- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
-
cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM
if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then
define HAVE_ARMV6
--
2.4.0
@@ -0,0 +1,56 @@
SUMMARY = "H.264/MPEG-4 AVC video encoder"
DESCRIPTION = "A free software library and application for encoding video streams into the H.264/MPEG-4 AVC format."
HOMEPAGE = "http://www.videolan.org/developers/x264.html"
LICENSE = "GPL-2.0-only"
LICENSE_FLAGS = "commercial"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
DEPENDS = "nasm-native"
SRC_URI = "git://github.com/mirror/x264;branch=stable;protocol=https \
file://don-t-default-to-cortex-a9-with-neon.patch \
file://Fix-X32-build-by-disabling-asm.patch \
"
UPSTREAM_CHECK_COMMITS = "1"
SRCREV = "baee400fa9ced6f5481a728138fed6e867b0ff7f"
PV = "r3039+git${SRCPV}"
S = "${WORKDIR}/git"
inherit lib_package pkgconfig
X264_DISABLE_ASM = ""
X264_DISABLE_ASM:x86 = "--disable-asm"
X264_DISABLE_ASM:armv4 = "--disable-asm"
X264_DISABLE_ASM:armv5 = "--disable-asm"
X264_DISABLE_ASM:powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}"
X264_DISABLE_ASM:mipsarch = "${@bb.utils.contains("TUNE_FEATURES", "r6", "", "--disable-asm", d)}"
EXTRA_OECONF = '--prefix=${prefix} \
--host=${HOST_SYS} \
--libdir=${libdir} \
--cross-prefix=${TARGET_PREFIX} \
--sysroot=${STAGING_DIR_TARGET} \
--enable-shared \
--enable-static \
--disable-lavf \
--disable-swscale \
--disable-opencl \
--enable-pic \
${X264_DISABLE_ASM} \
'
do_configure() {
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
./configure ${EXTRA_OECONF}
}
do_install() {
oe_runmake install DESTDIR=${D}
}
AS[unexport] = "1"