aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2021-12-27 12:04:18 +0000
committerBart Ribbers <bribbers@disroot.org>2021-12-28 16:37:09 +0100
commita3cb1a1e4943e8f33daf06946f35f93874198736 (patch)
tree721145424778388f712babd5293b4197f2f66a35
parent2e4148bdd078bbd16743e4fdb9834ab4b1cc157a (diff)
downloadaports-a3cb1a1e4943e8f33daf06946f35f93874198736.tar.gz
aports-a3cb1a1e4943e8f33daf06946f35f93874198736.tar.bz2
aports-a3cb1a1e4943e8f33daf06946f35f93874198736.tar.xz
community/qt5-qtwebengine: enable sndio support
-rw-r--r--community/qt5-qtwebengine/APKBUILD7
-rw-r--r--community/qt5-qtwebengine/sndio.patch142
2 files changed, 147 insertions, 2 deletions
diff --git a/community/qt5-qtwebengine/APKBUILD b/community/qt5-qtwebengine/APKBUILD
index fb8fb30401..2c2b935bff 100644
--- a/community/qt5-qtwebengine/APKBUILD
+++ b/community/qt5-qtwebengine/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qt5-qtwebengine
pkgver=5.15.3_git20211127
-pkgrel=3
+pkgrel=4
# latest commit of 5.15 branch at pkgver date
_commit="402f5a4a78347ed56be59396a3e3877ea9791f47"
# latest commit of 87-based branch of qtwebengine-chromium
@@ -58,6 +58,7 @@ makedepends="$depends_dev
pcre-dev
protobuf-dev
pulseaudio-dev
+ sndio-dev
qt5-qtbase-dev
qt5-qtdeclarative-dev
qt5-qtwebchannel-dev
@@ -94,6 +95,7 @@ source="$pkgname-$pkgver.tar.gz::https://invent.kde.org/qt/qt/qtwebengine/-/arch
remove-glibc-check.patch
fix-chromium-build.patch
default-pthread-stacksize.patch
+ sndio.patch
"
builddir="$srcdir/qtwebengine-$_commit"
@@ -275,7 +277,7 @@ prepare() {
}
build() {
- qmake-qt5 QMAKE_EXTRA_ARGS+="-system-ffmpeg -system-opus -system-webp -proprietary-codecs"
+ qmake-qt5 QMAKE_EXTRA_ARGS+="-webengine-sndio -system-ffmpeg -system-opus -system-webp -proprietary-codecs"
make
}
@@ -315,4 +317,5 @@ f565a31b007db408ef96db3f7d003f465d1db765fb84b50a1f82b449d49949dd4fafa2b374889621
0ef2adce746a0ee121f04aab8ad9e2e338f996286d045a2bffb20e57c37e9432f22cd0b574fbe06f19b928749c35f3d51d9b3a49967b51e89c3440240f110c35 remove-glibc-check.patch
f40f42a33e8d8c9a4129a2e40f3177d1ffc4d1fc28ceda7b8ffab9c8d14cdcca8d0e804c55257a2932e772f89fcf6e7401fe3398a70a045835add6d9c1ba7bb3 fix-chromium-build.patch
f4cb20796922b6e26433a18ab2ba5dd8750e8bbfb479e9416a362073c9e6a3ac12ee9e9868f6c9335b374b9d8ca8bed2e322e5ac3fe694a6ec6ddce8bd9b801b default-pthread-stacksize.patch
+9b14eee2854dc5040895ee2d53660a399f5f3f1defcd6d8586f889764356513a4d5596e36349b1a89674ecbd39f2f98e3985e322d1cf9b59a8fdc9a16da78893 sndio.patch
"
diff --git a/community/qt5-qtwebengine/sndio.patch b/community/qt5-qtwebengine/sndio.patch
new file mode 100644
index 0000000000..771e63043e
--- /dev/null
+++ b/community/qt5-qtwebengine/sndio.patch
@@ -0,0 +1,142 @@
+from void-packages, 0101,0102-sndio.patch
+--- a/src/core/configure.json 2020-03-24 10:16:30.000000000 +0100
++++ - 2020-04-06 14:28:00.591236926 +0200
+@@ -21,6 +21,7 @@
+ "webengine-printing-and-pdf": "boolean",
+ "webengine-proprietary-codecs": "boolean",
+ "webengine-pulseaudio": "boolean",
++ "webengine-sndio": "boolean",
+ "webengine-spellchecker": "boolean",
+ "webengine-native-spellchecker": "boolean",
+ "webengine-extensions": "boolean",
+@@ -31,6 +32,7 @@
+ "webengine-kerberos": "boolean",
+ "alsa": { "type": "boolean", "name": "webengine-alsa" },
+ "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" },
++ "sndio": { "type": "boolean", "name": "webengine-sndio" },
+ "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } },
+ "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } },
+ "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } },
+@@ -68,7 +70,13 @@
+ "sources": [
+ { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" }
+ ]
+- }
++ },
++ "sndio": {
++ "label": "sndio",
++ "sources": [
++ { "type": "pkgConfig", "args": "libsndio >= 1.5.0 libsndio" }
++ ]
++ }
+ },
+ "tests" : {
+ "webengine-host-compiler": {
+@@ -136,6 +144,10 @@
+ "condition": "libs.webengine-pulseaudio",
+ "output": [ "privateFeature" ]
+ },
++ "webengine-sndio": {
++ "label": "Use sndio",
++ "output": [ "privateFeature" ]
++ },
+ "webengine-pepper-plugins": {
+ "label": "Pepper Plugins",
+ "purpose": "Enables use of Pepper Flash plugins.",
+@@ -308,6 +320,11 @@
+ "condition": "config.unix"
+ },
+ {
++ "type": "feature",
++ "args": "webengine-sndio",
++ "condition": "config.unix"
++ },
++ {
+ "type": "feature",
+ "args": "webengine-sanitizer",
+ "condition": "config.sanitizer"
+--- a/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
++++ b/src/3rdparty/chromium/media/audio/linux/audio_manager_linux.cc
+@@ -20,6 +20,10 @@
+ #include "media/audio/pulse/audio_manager_pulse.h"
+ #include "media/audio/pulse/pulse_util.h"
+ #endif
++#if defined(USE_SNDIO)
++#include <sndio.h>
++#include "media/audio/openbsd/audio_manager_openbsd.h"
++#endif
+
+ namespace media {
+
+@@ -27,7 +31,8 @@ enum LinuxAudioIO {
+ kPulse,
+ kAlsa,
+ kCras,
+- kAudioIOMax = kCras // Must always be equal to largest logged entry.
++ kSndio,
++ kAudioIOMax = kSndio // Must always be equal to largest logged entry.
+ };
+
+ std::unique_ptr<media::AudioManager> CreateAudioManager(
+@@ -41,6 +46,17 @@ std::unique_ptr<media::AudioManager> CreateAudioManager(
+ }
+ #endif
+
++#if defined(USE_SNDIO)
++ struct sio_hdl * hdl = NULL;
++ if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) != NULL) {
++ sio_close(hdl);
++ UMA_HISTOGRAM_ENUMERATION("Media.LinuxAudioIO", kSndio, kAudioIOMax +1);
++ return std::make_unique<AudioManagerOpenBSD>(std::move(audio_thread),
++ audio_log_factory);
++ }
++ DVLOG(1) << "Sndio is not available on the OS";
++#endif
++
+ #if defined(USE_PULSEAUDIO)
+ pa_threaded_mainloop* pa_mainloop = nullptr;
+ pa_context* pa_context = nullptr;
+--- a/src/3rdparty/chromium/media/BUILD.gn 2020-03-24 10:16:30.000000000 +0100
++++ - 2020-04-06 14:32:27.960817513 +0200
+@@ -65,6 +65,9 @@
+ if (use_cras) {
+ defines += [ "USE_CRAS" ]
+ }
++ if (use_sndio) {
++ defines += [ "USE_SNDIO" ]
++ }
+ }
+
+ # Internal grouping of the configs necessary to support sub-folders having their
+--- a/src/3rdparty/chromium/media/media_options.gni 2020-03-24 10:16:30.000000000 +0100
++++ - 2020-04-06 14:29:22.958630783 +0200
+@@ -114,6 +114,9 @@
+ # Enables runtime selection of ALSA library for audio.
+ use_alsa = false
+
++ # Enables runtime selection of sndio library for audio.
++ use_sndio = false
++
+ # Alsa should be used on non-Android, non-Mac POSIX systems.
+ # Alsa should be used on desktop Chromecast and audio-only Chromecast builds.
+ if (is_posix && !is_android && !is_mac &&
+--- a/src/3rdparty/chromium/media/audio/BUILD.gn 2021-02-23 16:36:59.000000000 +0100
++++ - 2021-03-07 22:00:34.889682069 +0100
+@@ -238,6 +238,17 @@
+ sources += [ "linux/audio_manager_linux.cc" ]
+ }
+
++ if (use_sndio) {
++ libs += [ "sndio" ]
++ sources += [
++ "openbsd/audio_manager_openbsd.cc",
++ "sndio/sndio_input.cc",
++ "sndio/sndio_input.h",
++ "sndio/sndio_output.cc",
++ "sndio/sndio_output.h"
++ ]
++ }
++
+ if (use_alsa) {
+ libs += [ "asound" ]
+ sources += [