Skip to content
Snippets Groups Projects
Commit cc05a388 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

qt: enable ffmpeg backend for Qt Multimedia

Change-Id: I34fc48ac880a6673579f88b700b0baa5bd8cd585
parent 223cb649
No related branches found
No related tags found
No related merge requests found
// Copyright (C) 2021 Savoir-faire Linux Inc.
// Copyright (C) 2021-2022 Savoir-faire Linux Inc.
//
// Author: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com>
//
......
......@@ -75,6 +75,10 @@ RUN dnf install -y \
nodejs \
bison \
flex \
gstreamer1 gstreamer1-devel \
gstreamer1-plugins-base-devel \
gstreamer1-plugins-good \
gstreamer1-plugins-bad-free-devel \
nss-devel \
libxcb* \
libxkb* \
......
......@@ -75,6 +75,10 @@ RUN dnf install -y \
llvm-devel \
nodejs \
flex \
gstreamer1 gstreamer1-devel \
gstreamer1-plugins-base-devel \
gstreamer1-plugins-good \
gstreamer1-plugins-bad-free-devel \
nss-devel \
libxcb* \
libxkb* \
......
......@@ -75,6 +75,10 @@ RUN dnf install -y \
llvm-devel \
nodejs \
flex \
gstreamer1 gstreamer1-devel \
gstreamer1-plugins-base-devel \
gstreamer1-plugins-good \
gstreamer1-plugins-bad-free-devel \
nss-devel \
libxcb* \
libxkb* \
......
......@@ -66,6 +66,7 @@ RUN zypper --non-interactive install -y \
gperf \
bison \
flex \
ffmpeg ffmpeg-devel \
nodejs12 \
mozilla-nss-devel \
python-xml \
......
......@@ -79,14 +79,12 @@ cd %{_builddir}/jami-project/daemon/contrib/native && \
make fetch && \
make %{_smp_mflags} V=1 && \
make %{_smp_mflags} V=1 .ffmpeg
# Configure the daemon.
cd %{_builddir}/jami-project/daemon && \
./autogen.sh && \
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir}
# Build the daemon.
make -C %{_builddir}/jami-project/daemon %{_smp_mflags} V=1
pod2man %{_builddir}/jami-project/daemon/man/jamid.pod \
......
......@@ -48,7 +48,6 @@ cd %{_builddir}/jami-project/client-gnome && \
-DCMAKE_BUILD_TYPE=Debug \
-DGSETTINGS_LOCALCOMPILE=OFF \
..
make -C %{_builddir}/jami-project/client-gnome/build \
LDFLAGS="-lpthread" %{_smp_mflags} V=1
......
......@@ -32,7 +32,6 @@ users.
%setup -n jami-project
%build
# Qt-related variables
cd %{_builddir}/jami-project/lrc && \
mkdir build && cd build && \
......@@ -42,7 +41,6 @@ cd %{_builddir}/jami-project/lrc && \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_BUILD_TYPE=Release \
..
make -C %{_builddir}/jami-project/lrc/build %{_smp_mflags} V=1
%install
......
%define name jami-libqt
%define version RELEASE_VERSION
%define release 0
%define release 2
# qtwebengine (aka chromium) takes a ton of memory per build process,
# up to 2.3 GiB. Cap the number of jobs based on the amount of
......@@ -27,6 +27,11 @@ Vendor: Savoir-faire Linux
URL: https://jami.net/
Source: jami-qtlib_%{version}.tar.xz
%global gst 0.10
%if 0%{?fedora} || 0%{?rhel} > 7
%global gst 1.0
%endif
# Build dependencies
BuildRequires: autoconf
BuildRequires: make
......@@ -36,8 +41,18 @@ BuildRequires: gperf
BuildRequires: flex
BuildRequires: vulkan-devel
%if %{defined suse_version}
BuildRequires: ffmpeg-devel
BuildRequires: ffmpeg
BuildRequires: python-xml
BuildRequires: mozilla-nss-devel
%else
BuildRequires: pkgconfig(gstreamer-%{gst})
BuildRequires: pkgconfig(gstreamer-app-%{gst})
BuildRequires: pkgconfig(gstreamer-audio-%{gst})
BuildRequires: pkgconfig(gstreamer-base-%{gst})
BuildRequires: pkgconfig(gstreamer-pbutils-%{gst})
BuildRequires: pkgconfig(gstreamer-plugins-bad-%{gst})
BuildRequires: pkgconfig(gstreamer-video-%{gst})
%endif
%description
......@@ -68,7 +83,6 @@ sed -i 's,#include <QtCore/qbytearray.h>,#include <QtCore/qbytearray.h>\n#includ
-nomake tests \
-prefix "%{_libdir}/qt-jami"
sed -i 's,bin/python,bin/env python3,g' qtbase/mkspecs/features/uikit/devices.py
# Chromium is built using Ninja, which doesn't honor MAKEFLAGS.
cmake --build . --parallel
......
......@@ -38,7 +38,6 @@ privacy of its users.
%setup -n jami-project
%build
# Qt-related variables
cd %{_builddir}/jami-project/client-qt && \
mkdir build && cd build && \
......@@ -46,7 +45,6 @@ cd %{_builddir}/jami-project/client-qt && \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_BUILD_TYPE=Release \
..
make -C %{_builddir}/jami-project/client-qt/build %{_smp_mflags} V=1
%install
......
......@@ -44,6 +44,7 @@ CMAKE_PREFIX_PATH="${QT_JAMI_PREFIX}/lib/cmake:${CMAKE_PREFIX_PATH}"
QT_MAJOR=6
QT_MINOR=2
QT_PATCH=3
QT_RELEASE_PATCH=3
QT_MAJOR_MINOR=${QT_MAJOR}.${QT_MINOR}
QT_MAJOR_MINOR_PATCH=${QT_MAJOR}.${QT_MINOR}.${QT_PATCH}
......@@ -56,9 +57,9 @@ QT_TARBALL_FILE_NAME=$(basename "$QT_TARBALL_URL")
CACHED_QT_TARBALL=$TARBALLS/$QT_TARBALL_FILE_NAME
mkdir -p "$TARBALLS/$DISTRIBUTION"
RPM_PATH=$TARBALLS/$DISTRIBUTION/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.x86_64.rpm
RPM_PATH=$TARBALLS/$DISTRIBUTION/jami-libqt-$QT_MAJOR_MINOR_PATCH-${QT_RELEASE_PATCH}.x86_64.rpm
if [[ "${DISTRIBUTION:0:4}" == "rhel" ]]; then
RPM_PATH=$TARBALLS/${DISTRIBUTION}/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.el8.x86_64.rpm
RPM_PATH=$TARBALLS/${DISTRIBUTION}/jami-libqt-$QT_MAJOR_MINOR_PATCH-${QT_RELEASE_PATCH}.el8.x86_64.rpm
fi
if [ ! -f "${RPM_PATH}" ]; then
......@@ -101,13 +102,13 @@ if [ ! -f "${RPM_PATH}" ]; then
# Cache the built Qt RPM package.
if [[ "${DISTRIBUTION:0:4}" == "rhel" ]]; then
cp "/root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.el8.x86_64.rpm" "${RPM_PATH}"
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-*.el8.x86_64.rpm "${RPM_PATH}"
elif [[ "${DISTRIBUTION}" == "fedora_33" ]]; then
cp "/root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.fc33.x86_64.rpm" "${RPM_PATH}"
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-*.fc33.x86_64.rpm "${RPM_PATH}"
elif [[ "${DISTRIBUTION}" == "fedora_34" ]]; then
cp "/root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.fc34.x86_64.rpm" "${RPM_PATH}"
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-*.fc34.x86_64.rpm "${RPM_PATH}"
elif [[ "${DISTRIBUTION}" == "fedora_35" ]]; then
cp "/root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.fc35.x86_64.rpm" "${RPM_PATH}"
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-*.fc35.x86_64.rpm "${RPM_PATH}"
else
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-*.rpm "${RPM_PATH}"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment