64 lines
2.2 KiB
Bash
64 lines
2.2 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
pkgname=static-compat-qt6-multimedia
|
|
_qtver=6.4.2
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
arch=(x86_64)
|
|
url='https://www.qt.io'
|
|
license=(GPL3 LGPL3 FDL custom)
|
|
pkgdesc='Classes for audio, video, radio and camera functionality'
|
|
depends=(static-compat-qt6-base)
|
|
optdepends=('static-compat-qt6-declarative: QML bindings')
|
|
makedepends=(static-compat-cmake static-compat-qt6-declarative static-compat-qt6-shadertools static-compat-vulkan-headers ninja)
|
|
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
|
|
_pkgfqn="qtmultimedia-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
|
|
'0001-Fix-compile-flags-of-resonance-audio-for-mingw-w64.patch')
|
|
sha256sums=('7f2b70deeada911c8e660e2801286657f297a5d1d543d1f6bfa856f28972c776'
|
|
'cc77d92e90bf09058e8d8470585cc8a87e8af99f9e2c99c4014ca6add638839a')
|
|
|
|
prepare () {
|
|
cd $_pkgfqn
|
|
|
|
# apply patches; further descriptions can be found in patch files itself
|
|
for patch in "$srcdir/"*.patch; do
|
|
msg2 "Applying patch $patch"
|
|
patch -p1 -i "$patch"
|
|
done
|
|
}
|
|
|
|
build() {
|
|
check_buildoption ccache y && ccache_args='
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache'
|
|
source static-compat-environment
|
|
export PATH=$PWD:$PATH
|
|
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
|
|
chmod +x pkg-config
|
|
static-compat-cmake -G Ninja -B build -S $_pkgfqn \
|
|
$ccache_args \
|
|
-DCMAKE_SKIP_INSTALL_RPATH=ON \
|
|
-DGLIB2_USE_PKG_CONFIG=ON \
|
|
-DWAYLAND_USE_PKG_CONFIG=ON \
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_harfbuzz=TRUE \
|
|
-DQT_FEATURE_static_runtime=ON \
|
|
-DFEATURE_pkg_config=ON
|
|
VERBOSE=1 cmake --build build
|
|
}
|
|
|
|
package() {
|
|
source static-compat-environment
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
|
|
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
|
|
find "$pkgdir/$static_compat_prefix/lib" -type f -name '*.prl' \
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
|
|
|
|
install -d "$pkgdir"/usr/share/licenses
|
|
ln -s /usr/share/licenses/static-compat-qt6-base "$pkgdir"/usr/share/licenses/$pkgname
|
|
}
|