# Contributor: Bart Ribbers # Maintainer: Bart Ribbers pkgname=qt6-qtmultimedia pkgver=6.5.2 pkgrel=0 pkgdesc="Classes for audio, video, radio and camera functionality" url="https://qt.io/" arch="all" license="LGPL-2.1-only AND LGPL-3.0-only AND GPL-3.0-only AND Qt-GPL-exception-1.0" depends_dev=" $pkgname-ffmpeg=$pkgver-r$pkgrel $pkgname-gstreamer=$pkgver-r$pkgrel alsa-lib-dev ffmpeg-dev gst-plugins-base-dev gstreamer-dev libva-glx-dev pulseaudio-dev qt6-qtbase-dev qt6-qtdeclarative-dev qt6-qtshadertools-dev qt6-qtsvg-dev " makedepends="$depends_dev cmake perl samurai " subpackages=" $pkgname-dev $pkgname-ffmpeg $pkgname-gstreamer " builddir="$srcdir/qtmultimedia-everywhere-src-${pkgver/_/-}" case $pkgver in *_alpha*|*_beta*|*_rc*) _rel=development_releases;; *) _rel=official_releases;; esac source="https://download.qt.io/$_rel/qt/${pkgver%.*}/${pkgver/_/-}/submodules/qtmultimedia-everywhere-src-${pkgver/_/-}.tar.xz select.patch " build() { # alsa disabled due to build failure for now # src/multimedia/platform/alsa/qalsaaudiosink.cpp:270:5: error: 'timeStamp' was not declared in this scope export CFLAGS="$CFLAGS -g1 -flto=auto" export CXXFLAGS="$CXXFLAGS -g1 -flto=auto" cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DINSTALL_BINDIR=lib/qt6/bin \ -DINSTALL_DOCDIR=share/doc/qt6 \ -DINSTALL_ARCHDATADIR=lib/qt6 \ -DINSTALL_DATADIR=share/qt6 \ -DINSTALL_INCLUDEDIR=include/qt6 \ -DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \ -DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \ -DQT_FEATURE_alsa=OFF \ -DQT_FEATURE_pulseaudio=ON cmake --build build --parallel } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build } ffmpeg() { pkgdesc="$pkgdesc (ffmpeg plugin)" # autopull if main dep exists anyway install_if="$pkgname=$pkgver-r$pkgrel ffmpeg-libavcodec" amove usr/lib/qt6/plugins/multimedia/libffmpegmediaplugin.so } gstreamer() { pkgdesc="$pkgdesc (gstreamer plugin)" # unlike above, these deps are not that obvious. # -base is pulled by e.g. gtk4 anyway, but practically nothing # would use this unless people added good, etc. so use that install_if="$pkgname=$pkgver-r$pkgrel gst-plugins-good" amove usr/lib/qt6/plugins/multimedia/libgstreamermediaplugin.so } sha512sums=" e12a2406e78eda8f3f4674b8fe01b06bc2c7b8fcbe5342e25e28340e13c0ab0db44a78c91a8a1f268664e5bb11c3bc7116248700f0c67faa618e058af0dfb1e0 qtmultimedia-everywhere-src-6.5.2.tar.xz 5c0f5a50952544d183c16f8b4b4f490bebb0260f255fed7bcd853081585792457792d72d5204307dae3133ca395044a90a14edab205d0ae28e0e3832ff995326 select.patch "