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

rpm: always build our qt version

This give us more controls about bugs and anyway, we're going to
use Qt 6.2 for macOS support.

Change-Id: I78c17a9984248b4dad08ab2091532159335d4c97
parent 004fda67
Branches
Tags
No related merge requests found
......@@ -5,6 +5,8 @@ RUN dnf clean all
RUN dnf install -y dnf-command\(builddep\) rpmdevtools && \
dnf install -y mock
RUN dnf groupinstall -y "X Software Development"
RUN dnf install -y \
git \
rpm-build \
......@@ -63,15 +65,27 @@ RUN dnf install -y \
libnotify-devel \
libupnp-devel \
qrencode-devel \
qt5-qtbase-devel \
qt5-qttools-devel \
qt5-qtdeclarative-devel \
qt5-qtquickcontrols \
qt5-qtquickcontrols2-devel \
qt5-qtmultimedia-devel \
qt5-qtsvg-devel \
qt5-qtwebengine-devel \
libargon2-devel \
libsndfile-devel \
libdrm \
gperf \
clang \
clang-devel \
nodejs \
bison \
flex \
nss-devel \
libxcb* \
libxkb* \
libXrender-devel \
xcb-util-* \
libX11-devel \
python2.7 \
xz \
xkeyboard-config \
libnotify \
wget \
libstdc++-static \
sqlite-devel
ADD scripts/build-package-rpm.sh /opt/build-package-rpm.sh
......
......@@ -5,6 +5,8 @@ RUN dnf clean all
RUN dnf install -y dnf-command\(builddep\) rpmdevtools && \
dnf install -y mock
RUN dnf groupinstall -y "X Software Development"
RUN dnf install -y \
git \
rpm-build \
......@@ -63,15 +65,27 @@ RUN dnf install -y \
libnotify-devel \
libupnp-devel \
qrencode-devel \
qt5-qtbase-devel \
qt5-qttools-devel \
qt5-qtdeclarative-devel \
qt5-qtquickcontrols \
qt5-qtquickcontrols2-devel \
qt5-qtmultimedia-devel \
qt5-qtsvg-devel \
qt5-qtwebengine-devel \
libargon2-devel \
libsndfile-devel \
libdrm \
gperf \
bison \
clang \
clang-devel \
nodejs \
flex \
nss-devel \
libxcb* \
libxkb* \
libX11-devel \
libXrender-devel \
xcb-util-* \
python2.7 \
xz \
xkeyboard-config \
libnotify \
wget \
libstdc++-static \
sqlite-devel
ADD scripts/build-package-rpm.sh /opt/build-package-rpm.sh
......
......@@ -20,8 +20,6 @@ BuildRequires: jami-daemon-devel = %{version}
BuildRequires: make
%if 0%{?fedora} >= 32
BuildRequires: NetworkManager-libnm-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qttools-devel
%endif
%description
......
......@@ -47,6 +47,15 @@ This package contains Qt libraries for Jami.
%build
echo "Building Qt using %{job_count} parallel jobs"
# https://bugs.gentoo.org/768261 (Qt 5.15)
sed -i 's,#include "absl/base/internal/spinlock.h"1,#include "absl/base/internal/spinlock.h"1\n#include <limits>,g' qtwebengine/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
sed -i 's,#include <stdint.h>,#include <stdint.h>\n#include <limits>,g' qtwebengine/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h
# https://bugreports.qt.io/browse/QTBUG-93452 (Qt 5.15)
sed -i 's,# include <utility>,# include <utility>\n# include <limits>,g' qtbase/src/corelib/global/qglobal.h
sed -i 's,#include <string.h>,#include <string.h>\n#include <limits>,g' qtbase/src/corelib/global/qendian.h
cat qtbase/src/corelib/global/qendian.h
sed -i 's,#include <string.h>,#include <string.h>\n#include <limits>,g' qtbase/src/corelib/global/qfloat16.h
sed -i 's,#include <QtCore/qbytearray.h>,#include <QtCore/qbytearray.h>\n#include <limits>,g' qtbase/src/corelib/text/qbytearraymatcher.h
./configure \
-opensource \
-confirm-license \
......@@ -54,6 +63,7 @@ echo "Building Qt using %{job_count} parallel jobs"
-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.
make -j%{job_count} V=1 NINJAFLAGS="-j%{job_count}"
......
......@@ -22,19 +22,6 @@ BuildRequires: make
# Build and runtime dependencies.
BuildRequires: qrencode-devel
%if 0%{?fedora} >= 32
BuildRequires: qt5-qttools-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel
BuildRequires: qt5-qtmultimedia-devel
BuildRequires: qt5-qtquickcontrols
BuildRequires: qt5-qtquickcontrols2-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qtwebengine-devel
# Runtime dependencies not automatically registered by RPM.
Requires: qt5-qtquickcontrols
Requires: qt5-qtgraphicaleffects
%endif
%description
This package contains the Qt desktop client of Jami. Jami is a free
......
......@@ -55,8 +55,7 @@ QT_TARBALL_SHA256="3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202
QT_TARBALL_FILE_NAME=$(basename "$QT_TARBALL_URL")
CACHED_QT_TARBALL=$TARBALLS/$QT_TARBALL_FILE_NAME
if [[ "${DISTRIBUTION:0:4}" == "rhel" \
|| "${DISTRIBUTION:0:13}" == "opensuse-leap" ]]; then
if [[ "${DISTRIBUTION}" != "opensuse-tumbleweed" ]]; then
mkdir -p "$TARBALLS/$DISTRIBUTION"
RPM_PATH=$TARBALLS/$DISTRIBUTION/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.x86_64.rpm
......@@ -103,9 +102,13 @@ if [[ "${DISTRIBUTION:0:4}" == "rhel" \
# Cache the built Qt RPM package.
if [[ "${DISTRIBUTION:0:4}" == "rhel" ]]; then
mv "/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-1.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}"
elif [[ "${DISTRIBUTION}" == "fedora_34" ]]; then
cp "/root/rpmbuild/RPMS/x86_64/jami-libqt-$QT_MAJOR_MINOR_PATCH-1.fc34.x86_64.rpm" "${RPM_PATH}"
else
mv /root/rpmbuild/RPMS/x86_64/jami-libqt-*.rpm "${RPM_PATH}"
cp /root/rpmbuild/RPMS/x86_64/jami-libqt-*.rpm "${RPM_PATH}"
fi
) 9>"${RPM_PATH}.lock"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment